Editor

Editor

Provide a word-processor-like control.

This class is a wrapper around the public CKEditor 5 utility. It is intended that this class be used exclusively rather than any of the raw CKEditor API. It provides a higher-level and more convenient API.

Please refer to CKEditor documentation on https://ckeditor.com/docs for more information.

Constructor

new Editor()

Source:

Methods

clear()

Description:
  • Clears the content of the editor.
Source:

dispose()

Description:
  • Dispose of the editor when it is no longer needed. Generally, Kiss handles this automatically.
Source:

getHtml() → {string}

Description:
  • Retrieves the HTML content from the editor.
Source:
Returns:
The HTML content of the editor.
Type
string

getText() → {string}

Description:
  • Retrieves the text (not HTML) content of the editor.
Source:
Returns:
Type
string

printEditorContent()

Description:
  • Print the contents of the editor
Source:

readOnly()

Description:
  • Sets the editor to read-only mode.
Source:

readWrite()

Description:
  • Sets the editor to read-write mode.
Source:

setHtml(html)

Description:
  • Sets the HTML content in the editor.
Source:
Parameters:
Name Type Description
html

(static) addEditor(editor)

Description:
  • Add an editor to the current context.
Source:
Parameters:
Name Type Description
editor

(async, static) create(parentId) → {Promise.<Editor>}

Description:
  • Creates a new instance of the Editor class and initializes it.
Source:
Parameters:
Name Type Description
parentId string The ID of the editor div.
Returns:
A promise that resolves to the initialized Editor instance.
Type
Promise.<Editor>

(static) newEditorContext()

Description:
  • Create a new editor context.
Source:

(static) popAllEditorContexts()

Description:
  • Destroys all popup and screen editors that have been created
Source:

(static) popEditorContext()

Description:
  • Destroy all editors in last context and remove the context
Source: