/ RichTextEditor / StaticFunctions
Search results

StaticFunctions API in React RichTextEditor API component

Root static functions of RichTextEditor Component

getStructuredHtml

Processes the given inner HTML value and returns a structured HTML string.

Parameter Type Description
innerValue string The inner HTML content to be processed.
enterKey string The key used for inserting line breaks.
enableHtmlEncode boolean A flag indicating whether HTML encoding should be enabled.

Returns string

insertItemsAtIndex

Inserts items at a specific index in an array.

Parameter Type Description
oldArray Array Specifies the old array.
newArray Array Specifies the elements to insert.
indexToInsert number Specifies the index to insert.

Returns Array

isInSet

checks if tag is in set

Parameter Type Description
set Set The set to check for the tag.
value string The tag to check for.

Returns boolean

scrollToCursor

Method to scroll the content to the cursor position

Parameter Type Description
document Document specifies the document.
inputElement HTMLElement | HTMLBodyElement specifies the input element.

Returns void

wrapTextAndInlineNodes

Wraps text and inline nodes within a given node to ensure proper HTML structure.

Parameter Type Description
node Node The DOM node whose child nodes are to be wrapped.
parentElement string The parent element tag to use for wrapping.

Returns void