Document Authoring

The Document Authoring SDK provides a way to seamlessly embed document authoring capabilities into your web app. It's a WYSIWYG editor that provides features traditionally found only in desktop word processors. You can read more and try a demo on our dedicated product page.

To help us shape this new authoring experience, we highly value your feedback! Please submit any feature requests or bug reports to support@pspdfkit.com with the subject line "Document Authoring: Feature Request/Bug Report". We appreciate your contributions and are excited to hear your thoughts!

The package is available on npm, and can be installed with your package manager of choice. The package name is @pspdfkit/document-authoring.

npm install @pspdfkit/document-authoring

The visual editor needs a suitable target DOM element:

<!--
Make sure `position` is set to a value other than the default or `static`!
If unsure use `relative`.
-->
<div id="editor" style="position: relative; width: 1024px; height: 600px;"></div>

The npm package can then be imported and the target set to the element:

import DocAuth from '@pspdfkit/document-authoring';

const docAuthSystem = await DocAuth.createDocAuthSystem();

const editor = await docAuthSystem.createEditor(document.getElementById('editor'), {
document: await docAuthSystem.createDocumentFromPlaintext('Hi there!'),
});

For more information see the createDocAuthSystem API reference.