MCPcopy
hub / github.com/ajaxorg/ace / setValue

Method setValue

src/document.js:45–49  ·  view source on GitHub ↗

* Replaces all the lines in the current `Document` with the value of `text`. * * @param {String} text The text to use

(text)

Source from the content-addressed store, hash-verified

43 * @param {String} text The text to use
44 **/
45 setValue(text) {
46 var len = this.getLength() - 1;
47 this.remove(new Range(0, 0, len, this.getLine(len).length));
48 this.insert({row: 0, column: 0}, text || "");
49 }
50
51 /**
52 * Returns all the lines in the document as a single string, joined by the new line character.

Callers

nothing calls this directly

Calls 4

getLengthMethod · 0.95
removeMethod · 0.95
getLineMethod · 0.95
insertMethod · 0.95

Tested by

no test coverage detected