From e1d1891de87c26c175b7bd8f36e6aedde0cf6405 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 22 May 2013 17:19:20 +0100 Subject: [PATCH] Don't set innerHTML to false Mistakenly setting the innerHTML to false, so went back to classic if/else if statements to only set on these 2 cases --- editor.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/editor.php b/editor.php index e279b94..c0b2bec 100644 --- a/editor.php +++ b/editor.php @@ -208,12 +208,11 @@ function createNewCMInstance(num) { // Update HTML edited files live if (top.ICEcoder.previewWindow.location) { if (top.ICEcoder.previewWindow.location.pathname==filepath) { - top.ICEcoder.previewWindow.document.documentElement.innerHTML = - ["htm","html","txt"].indexOf(fileExt) > -1 - ? window['cM'+num].getValue() - : ["md"].indexOf(fileExt) > -1 - ? mmd(window['cM'+num].getValue()) - : false; + if (["htm","html","txt"].indexOf(fileExt) > -1) { + top.ICEcoder.previewWindow.document.documentElement.innerHTML = window['cM'+num].getValue(); + } else if (["md"].indexOf(fileExt) > -1) { + top.ICEcoder.previewWindow.document.documentElement.innerHTML = mmd(window['cM'+num].getValue()); + } } else if (["css"].indexOf(fileExt) > -1) { if (top.ICEcoder.previewWindow.document.documentElement.innerHTML.indexOf(filename) > -1) { var css = window['cM'+num].getValue();