Skip to content

Commit f949555

Browse files
Stanley StuartRyan Florence
authored andcommitted
fix tinymce initialization between edits in eportfolios
fixes a bug where tinymce would not show up after editing/saving rich text in eportfolios. test plan: - as somebody with an eportfolio, make a page - add rich content to the page, and hit save - edit the rich content again. you should get the rich content editor and save the content. It should update as usual. fixes CNVS-1366 Change-Id: I29b516c13f9193ef63830ab9082c6866599c649f Reviewed-on: https://gerrit.instructure.com/20291 Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Cam Theriault <cam@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com> Product-Review: Ryan Florence <ryanf@instructure.com>
1 parent 8990036 commit f949555

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

public/javascripts/eportfolio.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ define([
149149
$("#edit_page_form,#page_content,#page_sidebar").removeClass('previewing');
150150
$("#page_content .preview_section").remove();
151151
}).end().find(".cancel_button").click(function() {
152+
$('.edit_section').editorBox('destroy');
152153
$("#edit_page_form,#page_content,#page_sidebar").removeClass('editing');
153154
$("#page_content .section.unsaved").remove();
154155
$(".edit_content_link_holder").show();
155156
$("#edit_page_form .edit_section").each(function() {
156-
$(this).editorBox('destroy');
157157
$(this).remove();
158158
});
159159
$("#page_content .section .form_content").remove();
@@ -179,10 +179,10 @@ define([
179179
return data;
180180
},
181181
beforeSubmit: function(data) {
182+
$('.edit_section').editorBox('destroy');
182183
$("#edit_page_form,#page_content,#page_sidebar").removeClass('editing').removeClass('previewing');
183184
$("#page_content .section.unsaved,#page_content .section .form_content").remove();
184185
$("#edit_page_form .edit_section").each(function() {
185-
$(this).editorBox('destroy');
186186
$(this).remove();
187187
});
188188
$(this).loadingImage();

0 commit comments

Comments
 (0)