The namespace for APIs dealing with document content editing
Members
-
<static> Types
-
Content Edit types.
Properties:
Name Type Description TEXT
string Text type content. OBJECT
string Object type content.
Methods
-
<static> getDocumentContent(contentEditPlaceholderAnnotation)
-
Gets the content box data for the passed in annotation. The passed in annotation must be a content edit placeholder annotation.
Parameters:
Name Type Description contentEditPlaceholderAnnotation
Core.Annotations.RectangleAnnotation Returns:
content The document content associated with this content edit placeholder annotation- Type
- Promise.<string>
Example
const content = await instance.Core.ContentEdit.getDocumentContent(contentEditPlaceholderAnnotation);
-
<static> preloadWorker(documentViewer)
-
Preloads the content editing worker. If this function isn't called then the worker will be loaded when the content editing tool is enabled.
Parameters:
Name Type Description documentViewer
Core.DocumentViewer The DocumentViewer to use as context for the page editing Returns:
Resolves after the worker has been loaded- Type
- Promise.<void>
-
<static> updateDocumentContent(contentEditPlaceholderAnnotation, content)
-
Update the document with new content
Parameters:
Name Type Description contentEditPlaceholderAnnotation
Core.Annotations.RectangleAnnotation content
string The new content Returns:
Resolves after the content has been updated- Type
- Promise.<void>
Example
instance.Core.ContentEdit.updateDocumentContent(contentEditPlaceholderAnnotation, 'New content');