diff --git a/cms/static/js/views/course_info_edit.js b/cms/static/js/views/course_info_edit.js index 19ed03fff9..9f662a0697 100644 --- a/cms/static/js/views/course_info_edit.js +++ b/cms/static/js/views/course_info_edit.js @@ -70,11 +70,13 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({ var $newForm = $(this.template({ updateModel : newModel })); var $textArea = $newForm.find(".new-update-content").first(); - this.$codeMirror = CodeMirror.fromTextArea($textArea.get(0), { - mode: "text/html", - lineNumbers: true, - lineWrapping: true, - }); + if (this.$codeMirror == null ) { + this.$codeMirror = CodeMirror.fromTextArea($textArea.get(0), { + mode: "text/html", + lineNumbers: true, + lineWrapping: true, + }); + } var updateEle = this.$el.find("#course-update-list"); $(updateEle).prepend($newForm);