Commit 9ac94fc4 by cahrens

Fire events when CodeMirror Editor is open and closed.

Needed to switch static links back and forth.
parent f6acab9d
......@@ -126,6 +126,9 @@ function start()
CodeMirror.defineInitHook(function(inst)
{
// EDX: added to switch static links.
editor.fire("ShowCodeMirror", inst);
// Move cursor to correct position:
inst.focus();
var cursor = inst.getSearchCursor(String.fromCharCode(chr), false);
......@@ -194,6 +197,10 @@ function submit()
}
// Submit HTML to TinyMCE:
// EDX: added to switch static links.
editor.fire('SaveCodeMirror', codemirror);
editor.setContent(codemirror.getValue().replace(cc, '<span id="CmCaReT"></span>'));
editor.isNotDirty = !isDirty;
if (isDirty) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment