@onodocs/editor
v0.5.6
Published
OnoDocs browser Word editor, forms, review and application workflows.
Maintainers
Readme
OnoDocs Editor
@onodocs/editor provides the browser editor, template and form authoring, review controls, application sessions and collaborative editing UI. It uses the public document operations in @onodocs/sdk and presentation in @onodocs/canvas. Installing Editor installs matching SDK and Canvas versions. OnoDocs-authored Editor code is licensed under MIT, including its UI, application sessions, forms, templates and collaboration client. You may modify and redistribute that code, including in commercial products, while preserving the MIT notice and applicable third-party notices. SDK and Canvas remain separately commercially licensed; their production use requires covered application scope. Editor has no separate entitlement or purchase.
The editor source and runnable examples are maintained in the public OnoDocs repository. MIT permission for the editor does not grant production or redistribution rights in its SDK and Canvas dependencies.
npm install @onodocs/editorimport { createEditor } from "@onodocs/editor";
const editor = createEditor({ container, document: { licenseKey } });
await editor.open(bytes);
const saved = await editor.save();
editor.dispose();Use createTemplateEditor from the same entry for template authoring. @onodocs/editor/application provides autosave, recovery and host lifecycle. @onodocs/editor/forms provides controlled form filling and the form designer. @onodocs/editor/collaboration provides the collaborative editor, browser recovery and transport client. The host supplies authentication, persistence and collaboration service endpoints.
createFormDesigner includes a Forms tab for adding fields and opening their sidebar settings. Supply onPreview(designer) and onExportProject(designer) to expose your host's preview and project-export actions there. Both callbacks can call designer.save() to obtain matching Word bytes and field rules. Set ribbon: false to keep only the standard editor tabs and field sidebar. The complete document-forms example connects these actions to its existing fill and ZIP export workflows.
Runnable editor and workflow examples live in onodocs/onodocs. The npm package contains the editor library. See the SDK guide and the included workflow guides for supported document operations and limitations.
Migration from 0.4
| Previous import | Current import |
| --- | --- |
| @onodocs/sdk/editor | @onodocs/editor |
| @onodocs/sdk/application | @onodocs/editor/application |
| @onodocs/sdk/forms/browser | @onodocs/editor/forms |
| @onodocs/sdk/collaboration/browser | @onodocs/editor/collaboration |
Function names and supported behavior remain the same. The previous SDK entry points are removed. Document operations stay in @onodocs/sdk, /browser and /server. Form definitions, answers and validation stay in @onodocs/sdk/forms; the collaboration service and protocol stay in @onodocs/sdk/collaboration. HTTP integration stays in @onodocs/sdk/http. Canvas imports remain unchanged.
For backend rendering, install @onodocs/sdk playwright-core and provide a Chromium-family browser. Playwright is an optional SDK peer dependency; browser and data-only installations do not need it. The server adapter, HTTP service, form data operations and collaboration service have independent entry points and do not load the editor UI.
One named-application license covers commercial SDK and Canvas use, including the application's backend and self-hosted collaboration. Finished editors for end users are included. Editor source remains available under MIT. See application scope, output rights and redistribution terms.
