Editor

Editor which is injected in the toolbar plugins, and should not be instantiated by the developer.
This editor can be used to manipulate the HTML.

Example
define([
  "blueconic/api/widgets/dialogues/Editor"
], function(Editor) {
  var editor = new Editor();
  // ...
});

Functions

getData()String

Returns the data of the edited position.

Returns:
Type Description
String The data of the edited position.

insertComplexObject(pluginId, html, options)

Inserts a piece of HTML which is represented as a complex object. This means: the content can not be editted and the HTML is handled as a whole (for example with copy pasting)

Name Type Description
pluginId String

id of the plugin.

html String

HTML which will be injected in the complex object.

options Object

Configuration options of the complex object (e.g. reference to an external item). The configuration is passed on as parameter in the edit function and it is available for the frontend plugin.

insertHtml(html)

Insert the HTML of the position with the given HTML, leaving the original content intact.

Name Type Description
html String

The html to set.

setData(html)

Replace the HTML of the position with the given HTML.

Name Type Description
html String

The html to set.

Events

onBind()

Event thrown when the editor is bound.

onUnbind()

Event thrown when the editor is unbound.