|
|
|
@ -13,6 +13,18 @@
|
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// COPYPASTED from mediatag-plugin-dialog.js
|
|
|
|
|
var isReadOnly = function (el) {
|
|
|
|
|
if (!el) { return; }
|
|
|
|
|
var parent = el;
|
|
|
|
|
while (parent) {
|
|
|
|
|
if (parent.nodeName.toUpperCase() === 'BODY') {
|
|
|
|
|
return parent.getAttribute("contenteditable") === 'false';
|
|
|
|
|
}
|
|
|
|
|
parent = parent.parentElement;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var color1 = 'rgba(249, 230, 65, 1.0)';
|
|
|
|
|
var color2 = 'rgba(252, 181, 0, 1.0)';
|
|
|
|
|
|
|
|
|
@ -164,7 +176,8 @@
|
|
|
|
|
*/
|
|
|
|
|
editor.contextMenu.addListener(function(element, sel, path) {
|
|
|
|
|
var applicable = isApplicable(path, sel);
|
|
|
|
|
if (!applicable) { return; }
|
|
|
|
|
if (!applicable || isReadOnly(element.$)) { return; }
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
comment: CKEDITOR.TRISTATE_OFF,
|
|
|
|
|
};
|
|
|
|
|