You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple (6) editables with two different classes (.html_edit_simple, .html_edit_advanced) on website and I want to divide them by class and each to have its own contentHandler settings.
But no matter what I try, only the default settings are loaded.
The ones defined under window.Aloha.settings.contentHandler.handler.sanitize don't apply at all.
I made a console log just before Aloha.ready and everything is loaded correctly.
So where could be the issue.
Please help, I'm really running out of options here... :(
Thanks in advance ;)
The text was updated successfully, but these errors were encountered:
Hello
I have multiple (6) editables with two different classes (.html_edit_simple, .html_edit_advanced) on website and I want to divide them by class and each to have its own contentHandler settings.
But no matter what I try, only the default settings are loaded.
The ones defined under window.Aloha.settings.contentHandler.handler.sanitize don't apply at all.
The settings code that I use is the following:
(function(window, undefined) {
if (window.Aloha === undefined || window.Aloha === null) {
window.Aloha = {};
}
window.Aloha.settings = { sidebar: { disabled: true } };
window.Aloha.settings.contentHandler = {
insertHtml: [ 'word', 'generic', 'oembed', 'sanitize' ],
initEditable: [ 'sanitize' ],
getContents: [ 'blockelement', 'sanitize', 'basic' ],
sanitize: 'relaxed', // relaxed, restricted, basic,
allows: {
elements: ['strong', 'em', 'i', 'b', 'blockquote', 'br', 'cite', 'code', 'dd', 'div', 'dl', 'dt', 'em', 'i', 'li', 'ol', 'p', 'pre', 'q', 'small', 'strike', 'sub', 'sup', 'u', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'img', 'video', 'audio']
},
handler: {
generic: {
transformFormattings: false
},
sanitize: {
'.html_edit_simple': { elements: [ 'b', 'i', 'strong', 'em', 'strike', 'u', 'a' ] },
'.html_edit_advanced': { elements: [ 'b', 'i', 'strong', 'em', 'strike', 'u', 'a', 'br', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'sub', 'sup', 'ul', 'ol', 'li', 'div', 'img', 'video', 'audio' ] }
}
}
}
})(window);
I made a console log just before Aloha.ready and everything is loaded correctly.
So where could be the issue.
Please help, I'm really running out of options here... :(
Thanks in advance ;)
The text was updated successfully, but these errors were encountered: