diff --git a/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js b/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js index 032bb77f85..e6bcfade41 100644 --- a/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js +++ b/common/static/js/vendor/ova/OpenSeaDragonAnnotation.js @@ -1035,6 +1035,10 @@ OpenSeadragonAnnotation = function (element, options) { function reloadEditor(){ tinymce.EditorManager.execCommand('mceRemoveEditor',true, "annotator-field-0"); tinymce.EditorManager.execCommand('mceAddEditor',true, "annotator-field-0"); + + // if person hits into/out of fullscreen before closing the editor should close itself + // ideally we would want to keep it open and reposition, this would make a great TODO in the future + annotator.editor.hide(); } var self = this; diff --git a/common/static/js/vendor/ova/catch/js/catch.js b/common/static/js/vendor/ova/catch/js/catch.js index c754182f05..7491d70fd7 100644 --- a/common/static/js/vendor/ova/catch/js/catch.js +++ b/common/static/js/vendor/ova/catch/js/catch.js @@ -1001,6 +1001,9 @@ CatchAnnotation.prototype = { var positionAnnotator = videojs.findPosition(wrapper[0]); var positionAdder = {}; + // the following addition to display makes sure the editor shows up + // after opening TinyMCE/editor within the image source + positionAdder.display = "block"; positionAdder.left = positionLeft.left - positionAnnotator.left; positionAdder.top = positionLeft.top + 20 - positionAnnotator.top; @@ -1010,6 +1013,7 @@ CatchAnnotation.prototype = { this.annotator.onAdderClick(); // Set vertical editor + $(this.annotator.editor.element).css(positionAdder); this.annotator.editor.resetOrientation(); this.annotator.editor.invertY(); diff --git a/common/static/js/vendor/ova/richText-annotator.js b/common/static/js/vendor/ova/richText-annotator.js index d036c2ea00..0b87a8eb1a 100644 --- a/common/static/js/vendor/ova/richText-annotator.js +++ b/common/static/js/vendor/ova/richText-annotator.js @@ -93,6 +93,17 @@ Annotator.Plugin.RichText = (function(_super) { // set the modification in the textarea of annotator $(editor.element).find('textarea')[0].value = tinymce.activeEditor.getContent(); }); + + // creates a function called whenever editor is resized + ed.on('init', function(mceInstance) { + + // get win means this event activates when window is resized + tinymce.dom.Event.bind(ed.getWin(), 'resize', function(e){ + + // mceInstance.target gets the editor, its id is used to retrieved iframe + $("#"+mceInstance.target.id+"_ifr").css('min-width', '400px'); + }); + }); // new button to add Rubrics of the url https://gteavirtual.org/rubric ed.addButton('rubric', { icon: 'rubric',