Skip to main content

TinyMCE Service

The TinyMCE Service provides a rich-text editor TinyMCE for HTML Elements

Methods

initializeTinyMceForElement(element, options)

Description

  • Initializes a TinyMCE editor on the element with option callbacks.

Return Value: null

Options:

  • element: HTML Element The element that is hooked into by the TinyMCE.
  • options: Object The options for TinyMCE callbacks and lifecycle hooks.
    • object properties include: onInit onFocus onBlur onChange onKeydown onPaste
  // options example
{
onInit: Function,
onFocus: Function,
onBlur: Function,
onChange: Function,
onKeydown: Function,
onPaste: Function,
}

Code Example

    digideckCore.tinyMceService.initializeTinyMceForElement(element, options);

stopAllTinyMceInstances()

Description

  • Destroys all instances of TinyMCE.

Return Value: null

Code Example

    digideckCore.tinyMceService.stopAllTinyMceInstances();