Closed indigoxela closed 11 months ago
Very odd workaround for indent/outdent: override the exec command with an empty function.
editor.on('PreInit', function (event) {
event.target.editorCommands.commands.exec.indent = function () {
console.log('can override indent');
}
event.target.editorCommands.commands.exec.outdent = function () {
console.log('can override outdent');
}
});
It's weird, that this works... The core IndentOutdent commands do nothing on lists, so list (li in ul/ol) indent/outdent still works. Too odd to just implement. Might break any time.
While slightly different, this comment suggests a similar approach, which means, it might not be completely silly.
Will give editor.addCommand('indent', function () {});
a try.
Update: works, and committed.
Closing for now, although I suspect, more hidden inline style usage might exist.
I thought, I found and fixed them all, but
indent
andoutdent
also use inline styles.This isn't a problem with lists (ul / ol), as those get transformed to nested lists, but this format also works on any block element - and then it adds padding via inline styles. And that won't work with the Filter module restriction (on display).
Apparently, the
table
plugin also uses inline styles?Not sure, how to work around that, yet.