Live editing of HTML files

Now when you have a stickyTab open and edit HTML files, it shows the
live edits as you type
This commit is contained in:
Matt Pass
2013-04-29 08:32:49 +01:00
parent 736d3c8744
commit 44cac8a7e1

View File

@@ -179,6 +179,14 @@ function createNewCMInstance(num) {
clearTimeout(window['cM'+num+'waiting']);
window['cM'+num+'waiting'] = setTimeout(top.ICEcoder.updateHints, 100);
}
// Update HTML edited files live
if (top.ICEcoder.stickyTab.location) {
var filename = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
var fileExt = filename.substr(filename.lastIndexOf(".")+1);
if (["htm","html"].indexOf(fileExt) > -1) {
top.ICEcoder.stickyTab.document.documentElement.innerHTML = window['cM'+num].getValue();
}
};
}
);