diff --git a/public/js/lib/coursewares/commonFrameWork.js b/public/js/lib/coursewares/commonFrameWork.js index 573b779935..c2987aed27 100644 --- a/public/js/lib/coursewares/commonFrameWork.js +++ b/public/js/lib/coursewares/commonFrameWork.js @@ -564,5 +564,12 @@ $('#submitButton').on('click', function() { $(document).ready(function(){ editorValue = (codeStorage.isAlive())? codeStorage.getEditorValue() : allSeeds; myCodeMirror.setValue(editorValue.replace(/fccss/gi, '")); - bonfireExecute(); + if(typeof $('#preview').html !== 'undefined'){ + $('#preview').load(function(){ + bonfireExecute(); + }); + } + else{ + bonfireExecute(); + } });