diff --git a/plugins/tiddlywiki/codemirror/engine.js b/plugins/tiddlywiki/codemirror/engine.js index 5cfce1f36..c205550f9 100755 --- a/plugins/tiddlywiki/codemirror/engine.js +++ b/plugins/tiddlywiki/codemirror/engine.js @@ -109,7 +109,9 @@ function CodeMirrorEngine(options) { // Create the CodeMirror instance this.cm = window.CodeMirror(function(cmDomNode) { // Note that this is a synchronous callback that is called before the constructor returns - self.domNode.appendChild(cmDomNode); + if(!self.widget.document.isTiddlyWikiFakeDom) { + self.domNode.appendChild(cmDomNode); + } },config); // Set up a change event handler