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

Function dialogDiv

static/editor.md/lib/codemirror/addon/dialog/dialog.js:14–29  ·  view source on GitHub ↗
(cm, template, bottom)

Source from the content-addressed store, hash-verified

12 mod(CodeMirror);
13})(function(CodeMirror) {
14 function dialogDiv(cm, template, bottom) {
15 var wrap = cm.getWrapperElement();
16 var dialog;
17 dialog = wrap.appendChild(document.createElement("div"));
18 if (bottom)
19 dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
20 else
21 dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
22
23 if (typeof template == "string") {
24 dialog.innerHTML = template;
25 } else { // Assuming it's a detached DOM element.
26 dialog.appendChild(template);
27 }
28 return dialog;
29 }
30
31 function closeNotification(cm, newVal) {
32 if (cm.state.currentNotificationClose)

Callers 1

dialog.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected