The editor
A demo of your own
The edition option adds restrictions, for a free trial, a public demo, or a lower tier of your own product. Restrictions only ever take away. None of them is needed for a license, and none changes what your plan allows.
JavaScript
element.editorOptions = {
edition: {
watermark: "Made with Acme Docs (free trial)",
maxFileBytes: 5 * 1024 * 1024,
maxFileMessage: "The free trial opens files up to 5 MB. Upgrade to open larger documents.",
headerFooterLocked: "Headers and footers are part of Acme Docs Pro.",
},
};TSX
<DorvynEditor serverUrl="/api/dorvyn" options={{ edition: { watermark: "Made with Acme Docs (free trial)" } }} />| Field | What it does |
|---|---|
watermark | A line added to the footer of every saved .docx |
maxFileBytes | The largest file the person can open, in bytes |
maxFileMessage | What they're told when a file is larger (default: "This editor opens files up to N MB.") |
headerFooterLocked | Header and footer editing is turned off, and this message is shown when the person tries |
Decide the edition from what your server knows about the user (their plan with you), and pass it in when the page renders. Anything in the page can be changed by a determined user, so treat the edition as a nudge for honest users, not as security: limits that matter belong on your server (for example, refusing to store a document from a free account in your onSave handler).