Type Alias DocAuthSystem

DocAuthSystem: {
    loadDocument(documentInput: DocAuthDocumentInput): Promise<DocAuthDocument>;
    importDOCX(docx: BlobInput, options?: ImportDOCXOptions): Promise<DocAuthDocument>;
    createEditor(target: HTMLElement, options?: CreateEditorOptions): Promise<DocAuthEditor>;
    createDocumentFromPlaintext(text: string, options?: CreateDocumentFromPlaintextOptions): Promise<DocAuthDocument>;
    destroy(): void;
}

A DocAuthSystem instance holds the internal WASM engine and loaded fonts. It is used to load or import documents and create DocAuthEditor instances.

Type declaration

  • loadDocument:function
    • Loads a document stored in the Document Authoring format. The document can be provided as a JSON string or a JavaScript object.

      Parameters

      Returns Promise<DocAuthDocument>

  • importDOCX:function
  • createEditor:function
    • Creates an editor in the specified HTML element. IMPORTANT: The position of the target element cannot be static or unset. If unsure, use relative.

      Parameters

      Returns Promise<DocAuthEditor>

  • createDocumentFromPlaintext:function
    • Creates a document from plain text by interpreting patterns and replacing characters. E.g.:

      • \n creates a line break in a paragraph
      • \n\n separates paragraphs
      • \t is replaced with spaces

      Parameters

      Returns Promise<DocAuthDocument>

  • destroy:function
    • Releases resources held by the system. IMPORTANT: The system and any editors created by this system can no longer be used after calling this.

      Returns void