MCPcopy
hub / github.com/Voog/wysihtml / initString

Function initString

test/commands/formatInline_test.js:199–209  ·  view source on GitHub ↗
(editor, command, val, tag, txt, offset)

Source from the content-addressed store, hash-verified

197 });
198
199 var initString = function(editor, command, val, tag, txt, offset) {
200 var editable = that.editableArea1,
201 el;
202 editor.setValue(txt, true);
203 editor.composer.selection.selectNode(editable);
204 if (command) {
205 editor.composer.commands.exec(command, val);
206 }
207 el = (tag) ? editable.querySelector(tag).firstChild : editable.firstChild;
208 that.setCaretTo(editor, el, offset);
209 }
210
211 editor.on("load", function() {
212 var editableElement = that.editableArea1;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected