don't hook auxiliary CMs

fixes #491
This commit is contained in:
tophf 2018-09-03 20:47:45 +03:00
parent 5933cf3586
commit c49f4dd11e

View File

@ -43,6 +43,9 @@ onDOMscriptReady('/codemirror.js').then(() => {
});
CodeMirror.defineInitHook(cm => {
if (!cm.display.wrapper.closest('#sections')) {
return;
}
if (prefs.get('editor.livePreview') && styleId) {
cm.on('changes', updatePreview);
}