addWidget method

void addWidget(
  1. Position pos,
  2. Element node, [
  3. bool scrollIntoView = false
])

Puts node, which should be an absolutely positioned DOM node, into the editor, positioned right below the given {line, ch} position. When scrollIntoView is true, the editor will ensure that the entire node is visible (if possible). To remove the widget again, simply use DOM methods (move it somewhere else, or call removeChild on its parent).

Implementation

void addWidget(Position pos, Element node, [bool scrollIntoView = false]) {
  callArgs('addWidget', [pos.toProxy(), node, scrollIntoView]);
}