MCPcopy
hub / github.com/witheve/Eve / attachDoc

Function attachDoc

src/codemirror.js:7779–7788  ·  view source on GitHub ↗
(cm, doc)

Source from the content-addressed store, hash-verified

7777
7778 // Attach a document to an editor.
7779 function attachDoc(cm, doc) {
7780 if (doc.cm) throw new Error("This document is already in use.");
7781 cm.doc = doc;
7782 doc.cm = cm;
7783 estimateLineHeights(cm);
7784 loadMode(cm);
7785 if (!cm.options.lineWrapping) findMaxLine(cm);
7786 cm.options.mode = doc.modeOption;
7787 regChange(cm);
7788 }
7789
7790 // LINE UTILITIES
7791

Callers 2

CodeMirrorFunction · 0.85
codemirror.jsFile · 0.85

Calls 4

estimateLineHeightsFunction · 0.85
loadModeFunction · 0.85
findMaxLineFunction · 0.85
regChangeFunction · 0.85

Tested by

no test coverage detected