Documentation

Insertion

insertBreakline #

Inserts the br tag at the caret.

var insertion = this.app.create('insertion');
var inserted = insertion.insertBreakline();

insertHtml #

  • html String

Inserts html at the caret.

var insertion = this.app.create('insertion');
var inserted = insertion.insertHtml('<span>HTML</span>');

insertChar #

Arguments
html String

Inserts html char at the caret.

var insertion = this.app.create('insertion');
var inserted = insertion.insertChar('&nbsp;');

insertNode #

Arguments
element Node, Element, Dom

Inserts the node at caret.

var insertion = this.app.create('insertion');
var node = document.createElement('img');
node.src = 'image-url';
var inserted = insertion.insertNode(node);