Class: ContentBoxEditor

Core.ContentEdit. ContentBoxEditor

The ContentBoxEditor class which contains action applied when edit content box

new ContentBoxEditor()

Methods


blur()

Blur the selected content box editor modal and remove hyperlink

getCurrentSelection()

Return the current selection
Returns:
A promise that resolves to an object containing the current selection range with startIndex and endIndex properties
Type
Promise.<Core.ContentEdit.ContentBoxEditor.TextSelectionRange>

getTextAttributes()

Retrieve the present text attributes of the selected content within the content box.
Returns:
A promise that resolves to the text attributes of the selected content
Type
Promise.<Core.ContentEdit.TextAttributes>

Insert hyperlink to selected characters
Parameters:
Name Type Description
hyperlink string The hyperlink URL to insert
Returns:
A promise that resolves when the hyperlink is inserted
Type
Promise.<void>

loadHyperLinkURL()

Load hyperlink from selected characters
Returns:
A promise that resolves when the hyperlink URL is loaded
Type
Promise.<void>

Type Definitions


TextSelectionRange

Properties:
Name Type Description
startIndex number The starting index of the selection
endIndex number The ending index of the selection