Skip to main content

Represents a Word document opened by the app in Word.

Properties (2)

Property Type Default Required Description
data⚓︎ string x

The content of the document in HTML format.

name⚓︎ string x

Name of the Word document.

3 Methods

getHtml()⚓︎

(callback: (html?: string) => void) => Promise<string>

Retrieves the HTML content of the Word document.

Parameters (1)

Name Type Required Description
callback⚓︎ (html?: string) => void

Callback for handling the HTML content of the Word document.

onChanged()⚓︎

(callback: (html: string, docx?: string) => void) => UnsubscribeFunction

Notifies when the document has been modified in Word. Returns an unsubscribe function.

Parameters (1)

Name Type Required Description
callback⚓︎ (html: string, docx?: string) => void

Callback function for handling the event. Receives as arguments the content of the document as HTML and as DOCX. The DOCX content is represented as a Base64 string.

onClose()⚓︎

(callback: () => void) => UnsubscribeFunction

Notifies when the document is closed in Word. Returns an unsubscribe function.

Parameters (1)

Name Type Required Description
callback⚓︎ () => void

Callback function for handling the event.