TinyMCE Plugin: Added media plugin to TinyMCE for the Annotation tool
- fixed missing media and link buttons on image - fixed a CSS issue with the sharing button
This commit is contained in:
@@ -162,8 +162,8 @@
|
||||
/* Viewer */
|
||||
.annotator-viewer .share-viewer-annotator div.share-text-annotator,
|
||||
.annotator-viewer .share-viewer-annotator div.share-button,
|
||||
.annotator-wrapper div.share-button,
|
||||
.annotator-wrapper div.share-text-annotator {
|
||||
.annotator-wrapper .annotator-viewer div.share-button,
|
||||
.annotator-wrapper .annotator-viewer div.share-text-annotator {
|
||||
border-top: 0;
|
||||
padding: 0;
|
||||
background-size: 2em;
|
||||
|
||||
@@ -23,27 +23,28 @@ var _ref,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
Annotator.Plugin.RichText = (function(_super) {
|
||||
|
||||
__extends(RichText, _super);
|
||||
|
||||
|
||||
// default tinymce configuration
|
||||
//Default tinymce configuration
|
||||
RichText.prototype.options = {
|
||||
tinymce:{
|
||||
selector: "li.annotator-item textarea",
|
||||
skin: 'studio-tmce4',
|
||||
formats: {
|
||||
code: {
|
||||
inline: 'code',
|
||||
inline: 'code'
|
||||
}
|
||||
},
|
||||
codemirror: {
|
||||
path: "/static/js/vendor",
|
||||
path: "/static/js/vendor"
|
||||
},
|
||||
plugins: "image link codemirror",
|
||||
plugins: "image link codemirror media",
|
||||
menubar: false,
|
||||
toolbar_items_size: 'small',
|
||||
extended_valid_elements : "iframe[src|frameborder|style|scrolling|class|width|height|name|align|id]",
|
||||
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image rubric | code ",
|
||||
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | code ",
|
||||
resize: "both",
|
||||
}
|
||||
};
|
||||
|
||||
1
common/static/js/vendor/tinymce/js/tinymce/plugins/codemirror/plugin.min.js
vendored
Normal file
1
common/static/js/vendor/tinymce/js/tinymce/plugins/codemirror/plugin.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
tinymce.PluginManager.requireLangPack("codemirror"),tinymce.PluginManager.add("codemirror",function(e,t){function n(){e.focus(),e.selection.collapse(!0),e.selection.setContent('<span class="CmCaReT" style="display:none">�</span>');var n,o=tinyMCE.baseURL.indexOf("/static/");n=o>0?tinyMCE.baseURL.substring(0,o):window.location.origin;var i="?CodeMirrorPath="+e.settings.codemirror.path+"&ParentOrigin="+window.location.origin,a=e.windowManager.open({title:"HTML source code",url:t+"/source.html"+i,width:800,height:550,resizable:!0,maximizable:!0,buttons:[{text:"OK",subtype:"primary",onclick:function(){s({type:"save"})}},{text:"Cancel",onclick:function(){s({type:"cancel"})}}]}),c=a.getEl().getElementsByTagName("iframe")[0].contentWindow,s=function(e){c.postMessage(e,n)},r=function(t){if(n===t.origin){var o;if("init"===t.data.type)o={content:e.getContent({source_view:!0})},e.fire("ShowCodeEditor",o),s({type:"init",content:o.content}),e.dom.remove(e.dom.select(".CmCaReT"));else if("setText"===t.data.type){o={content:t.data.text};var i=t.data.isDirty;e.fire("SaveCodeEditor",o),e.setContent(o.content);var c=e.dom.select("span#CmCaReT")[0];if(c)e.selection.scrollIntoView(c),e.selection.setCursorLocation(c,0),e.dom.remove(c);else{var r=e.getContent(),d=r.replace('<span id="CmCaReT"></span>',"");r!==d&&e.setContent(d)}e.isNotDirty=!i,i&&e.nodeChanged()}else"closeWindow"===t.data.type&&a.close()}};a.on("close",function(){window.removeEventListener("message",r)}),window.addEventListener("message",r,!1)}e.addButton("code",{title:"Edit HTML",text:"HTML",icon:!1,onclick:n}),e.addMenuItem("code",{icon:"code",text:"Edit HTML",context:"tools",onclick:n})});
|
||||
1
common/static/js/vendor/tinymce/js/tinymce/plugins/media/plugin.min.js
vendored
Normal file
1
common/static/js/vendor/tinymce/js/tinymce/plugins/media/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -117,4 +117,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
// $hash: d99d9b748c4f7521874d185c37bfd19a
|
||||
// $hash: 7defca82ccee8e0915c8ba39c142611d
|
||||
@@ -114,4 +114,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
// $hash: 251b042e64f9ee017e1974a6737a818f
|
||||
// $hash: c439da07cfa97735afe2d2e4ab14b32b
|
||||
@@ -116,4 +116,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
// $hash: a7dd468b88f17972bfbd56fb01359c08
|
||||
// $hash: 04ebfed8dc91acb8886fbcda197d4ca5
|
||||
@@ -211,4 +211,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
// $hash: 05926848bb50eefb8b0a63bc5141644e
|
||||
// $hash: e3f9c72105e904a566d407accde5e542
|
||||
File diff suppressed because one or more lines are too long
@@ -210,4 +210,4 @@
|
||||
writeScripts();
|
||||
})(this);
|
||||
|
||||
// $hash: 0987d954549d1d01100987db6426ea5d
|
||||
// $hash: 84449488706f3974c0cecaf285cc5de0
|
||||
@@ -161,11 +161,12 @@
|
||||
richText: {
|
||||
tinymce:{
|
||||
selector: "li.annotator-item textarea",
|
||||
plugins: "image codemirror",
|
||||
plugins: "image link codemirror media",
|
||||
menubar: false,
|
||||
toolbar_items_size: 'small',
|
||||
extended_valid_elements : "iframe[src|frameborder|style|scrolling|class|width|height|name|align|id]",
|
||||
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | image rubric | code ",
|
||||
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | code ",
|
||||
resize: "both",
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user