Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tinymce.PluginManager.add('schematags', function(editor) {
// re-implementing tinymce.ui.Menu to use dialogWrapper and so that we can set autohide
tinymce.ui.Factory.add('cwrcmenu', tinymce.ui.FloatPanel.extend({
Defaults: {
defaultType: 'menuitem',
border: 1,
layout: 'stack',
role: 'application',
bodyRole: 'menu',
ariaRoot: true
},
init: function(settings) {
var self = this;
settings.autohide = settings.autohide == undefined ? true : settings.autohide;
settings.constrainToViewport = true;
if (settings.itemDefaults) {
if (tag != null) {
outParents.push({name: tag, element: n});
}
}
}
self.row(outParents);
});
// }
return self._super();
}
});
var path = new tinymce.ui.CWRCPath(editor);
});
if (tag != null) {
outParents.push({name: tag, element: n});
}
}
}
self.row(outParents);
});
// }
return self._super();
}
});
var path = new tinymce.ui.CWRCPath(editor);
});
tinymce.PluginManager.add('cwrcpath', function(editor) {
tinymce.ui.CWRCPath = tinymce.ui.Path.extend({
postRender: function() {
var self = this;
function isHidden(elm) {
if (elm.nodeType === 1) {
if (elm.nodeName == "BR" || !!elm.getAttribute('data-mce-bogus')) {
return true;
}
if (elm.getAttribute('data-mce-type') === 'bookmark') {
return true;
}
}
return false;
}
tinymce.PluginManager.add('cwrcpath', function(editor) {
tinymce.ui.CWRCPath = tinymce.ui.Path.extend({
postRender: function() {
var self = this;
function isHidden(elm) {
if (elm.nodeType === 1) {
if (elm.nodeName == "BR" || !!elm.getAttribute('data-mce-bogus')) {
return true;
}
if (elm.getAttribute('data-mce-type') === 'bookmark') {
return true;
}
}
return false;
}