-
contentBoxAdded
-
Triggered when a content box (text or image) is added while in content edit mode.
Parameters:
Name |
Type |
Description |
contentBox |
object
|
An object containing information about the added content box.
Properties
Name |
Type |
Description |
id |
string
|
ID of the added content box. |
type |
string
|
Determines what type of content was added. Either "text" or "image". |
pageNumber |
number
|
The page number where the content was added. |
position |
Core.Math.Rect
|
The content position in viewer coordinates. |
data |
ArrayBuffer
|
string
|
If type is image the data will be an ArrayBuffer of image data. Otherwise the data is an HTML string representing the inner styling and text of the content box. |
|
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:
Name |
Type |
Description |
contentBox |
object
|
An object containing information about the deleted content box.
Properties
Name |
Type |
Description |
id |
string
|
ID of the deleted content box. |
type |
string
|
Determines what type of content was deleted. Either "text" or "image". |
pageNumber |
number
|
The page number where the content was deleted. |
|
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 digital 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());
});