Fire events when CodeMirror Editor is open and closed.

Needed to switch static links back and forth.
This commit is contained in:
cahrens
2014-03-17 14:47:13 -04:00
parent f6acab9d9e
commit 9ac94fc4ac

View File

@@ -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) {