MCPcopy Index your code
hub / github.com/tinymce/tinymce / replace

Method replace

modules/tinymce/src/core/main/ts/api/html/Node.ts:151–162  ·  view source on GitHub ↗

* Replaces the current node with the specified one. * * @method replace * @param {tinymce.html.Node} node Node to replace the current node with. * @return {tinymce.html.Node} The old node that got replaced. * @example * someNode.replace(someNewNode);

(node: AstNode)

Source from the content-addressed store, hash-verified

149 * someNode.replace(someNewNode);
150 */
151 public replace(node: AstNode): AstNode {
152 const self = this;
153
154 if (node.parent) {
155 node.remove();
156 }
157
158 self.insert(node, self);
159 self.remove();
160
161 return self;
162 }
163
164 /**
165 * Gets/sets or removes an attribute by name.

Callers 15

escapeRegExpFunction · 0.80
tokensFunction · 0.80
cssFunction · 0.80
TableSizeTest.tsFile · 0.80
mergeTablesFunction · 0.80
makeNewFunction · 0.80
escapeHtmlFunction · 0.80
buildEntriesFunction · 0.80
Gruntfile.jsFile · 0.80
buildEntriesFunction · 0.80
generateFunction · 0.80
targetIdToTargetInfoFunction · 0.80

Calls 2

insertMethod · 0.80
removeMethod · 0.65

Tested by

no test coverage detected