From cf95dc0b75816518cee3a7787eb97ac937726be3 Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Wed, 10 Sep 2014 15:50:50 -0400 Subject: [PATCH] [TNL-293] Annotation Tool: Fixed TinMCE issue when changing units - fixed tinymce editors condition to check only positive numbers --- common/static/js/vendor/ova/richText-annotator.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/static/js/vendor/ova/richText-annotator.js b/common/static/js/vendor/ova/richText-annotator.js index 99049aad57..d036c2ea00 100644 --- a/common/static/js/vendor/ova/richText-annotator.js +++ b/common/static/js/vendor/ova/richText-annotator.js @@ -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); }; /**