-
endContentEditMode()
-
Ends the Content Edit mode and removes content edit
boxes from the document.
-
getContentBoxAttributes(contentBoxId)
-
Gets the text attributes applied to the content edit box.
Parameters:
| Name |
Type |
Description |
contentBoxId |
string
|
The ID of the content box. |
Returns:
A promise that resolves to an object containing the text attributes applied to the content box.
-
Type
-
Promise.<Core.ContentEdit.TextAttributes>
-
getContentBoxById(id)
-
Gets a content box instance by its ID.
Parameters:
| Name |
Type |
Description |
id |
string
|
The content box ID |
Returns:
The content box instance
-
Type
-
Core.ContentEdit.ContentBox
-
isInContentEditMode()
-
Gets if the Content Edit manager is currently in content edit mode
Returns:
True if currently in content edit mode, false otherwise
-
Type
-
boolean
-
isToolAllowedInContentEditMode(toolName)
-
Returns whether or not a tool is allowed to be used in content edit mode.
Parameters:
| Name |
Type |
Description |
toolName |
string
|
The name of the tool to check. |
Returns:
Whether or not the tool is allowed in content edit mode.
-
Type
-
boolean
-
startContentEditMode()
-
Starts the Content Edit mode, a mode in which links are disabled
and boxes are drawn around all editable content so users can edit them.
Returns:
A promise that resolves when Content Edit mode is started.
-
Type
-
Promise.<void>
-
toggleInvisibleCharacters()
-
Toggles the visibility of invisible characters in the content edit boxes
-
contentBoxAdded
-
Triggered when a content box (text or image) is added while in content edit mode.
Parameters:
Example
const { Core } = instance;
const { documentViewer } = Core;
const contentEditManager = documentViewer.getContentEditManager();
contentEditManager.addEventListener('contentBoxAdded', (contentBox) => {
console.log(contentBox.id);
console.log(contentBox.type);
console.log(contentBox.pageNumber);
console.log(contentBox.position);
console.log(contentBox.data);
});
-
contentBoxDeleted
-
Triggered when a content box (text or image) is deleted while in content edit mode.
Parameters:
Example
const { Core } = instance;
const { documentViewer } = Core;
const contentEditManager = documentViewer.getContentEditManager();
contentEditManager.addEventListener('contentBoxDeleted', (contentBox) => {
console.log(contentBox.id);
console.log(contentBox.type);
console.log(contentBox.pageNumber);
});
-
contentBoxEditEnded
-
Triggered when a Content edit box has ended being edited.
-
contentBoxEditStarted
-
Triggered when a Content edit box has started being edited.
Returns:
The content box editor instance.
-
Type
-
Core.ContentEdit.ContentBoxEditor
-
contentEditDocumentDigitallySigned
-
Triggered when a document is digitally signed in Content Edit mode.
-
contentEditModeEnded
-
Triggered when Content Edit mode is ended.
-
contentEditModeStarted
-
Triggered when Content Edit mode is started.
-
contentEditSelectionChange
-
Triggered when a text selection has changed in a content edit box.
Type:
SelectionChangeEvent
Parameters:
| Name |
Type |
Description |
selectionChangeEvent |
object
|
The JavaScript event object for the native selectionchange event. |
Example
const { Core } = instance;
const { documentViewer } = Core;
const contentEditManager = documentViewer.getContentEditManager();
contentEditManager.addEventListener('contentEditSelectionChange', (selectionChangeEvent) => {
console.log(selectionChangeEvent.event.target.getSelection().toString());
});