diff --git a/lib/file-control.php b/lib/file-control.php index b372a57..984f6af 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -323,7 +323,11 @@ if ($_GET['action']=="save") { } } // Reload previewWindow window if not a Markdown file - echo 'if (top.ICEcoder.previewWindow.location && top.ICEcoder.previewWindow.location.pathname.indexOf(".md")==-1) {top.ICEcoder.previewWindow.location.reload()};'; + echo 'if (top.ICEcoder.previewWindow.location && top.ICEcoder.previewWindow.location.pathname.indexOf(".md")==-1) { + top.ICEcoder.previewWindow.location.reload(); + // Do the pesticide plugin if it exists + try {top.ICEcoder.doPesticide();} catch(err) {}; + };'; echo 'top.ICEcoder.setPreviousFiles();action="doneSave";'; } else { $loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);