Merge pull request #5165 from lduarte1991/lduarte-harvardx-pr25

Annotation Tool: Fixed TinyMCE issue when changing units
This commit is contained in:
Sarina Canelake
2014-09-12 16:40:02 -04:00

View File

@@ -130,10 +130,11 @@ Annotator.Plugin.RichText = (function(_super) {
});
};
// makes sure that tinymce is not initiated by checking if editors exist
if(tinymce.editors.length === 0) {
tinymce.init(this.options.tinymce);
// makes sure that if tinymce exists already that this removes/destroys previous version
if (tinymce.editors.length > 0) {
tinymce.remove("li.annotator-item textarea");
}
tinymce.init(this.options.tinymce);
};
/**