MCPcopy Create free account
hub / github.com/TruthHun/BookStack / makeWidget

Function makeWidget

static/editor.md/lib/codemirror/addon/fold/foldcode.js:61–70  ·  view source on GitHub ↗
(cm, options)

Source from the content-addressed store, hash-verified

59 }
60
61 function makeWidget(cm, options) {
62 var widget = getOption(cm, options, "widget");
63 if (typeof widget == "string") {
64 var text = document.createTextNode(widget);
65 widget = document.createElement("span");
66 widget.appendChild(text);
67 widget.className = "CodeMirror-foldmarker";
68 }
69 return widget;
70 }
71
72 // Clumsy backwards-compatible interface
73 CodeMirror.newFoldFunction = function(rangeFinder, widget) {

Callers 1

doFoldFunction · 0.85

Calls 1

getOptionFunction · 0.85

Tested by

no test coverage detected