I removed some fields from <table> dialog window as here is demonstrated (dialogDefinition...), especially cellspacing, cellpadding and border. Then I expect, that if <table> from any source (web, Word...) is pasted, this attributes are disabled. But I always have border="1" etc. in HTML code. How to force editor to remove this unused attributes on paste?
I tried to use Allowed Content Rules, but editing config.allowedContent destroy/need to write all rules for all tags and extraAllowedContent does not override previously defined rules. I want to disable only a few attributes for one tag, not to write all new rules for whole editor.
The Adanced Content Filter
The Adanced Content Filter affects dialogs layouts, but it does not work in opposite way. Dialog layout cannot affect ACF. This is a limitation caused by the fact that dialogs are loaded on demand and ACF needs to be configured before editor#loaded event is fired.
We are planning a feature that could be a solution - a config.disallowedContent setting. You would be able to disallow some things, without rewriting entire allowedContent setting. Although, it is not yet implemented.
What you can do now is modifying a 'table' feature which is implemented by a 'table' command.
When plugins are loaded, get table command and modify content it allows. This will limit both - allowed content rules and also a table dialog layout (so you won't need to remove fields in the old way). Most features are implemented by commands, so it will work this way, but some are only by buttons or even registered straight to the ACF (using CKEDITOR.filter#addFeature). Thus, it may be a little inconvenient in some cases, therefore I've just reported ticket that should solve this problem completely.
Interesting observation could be that some configuration options can be replaced by ACF and features configuration. This may be a direction which we'll be following.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Appendix
Config.disallowedContent sounds fantastic and new direction wih ACF too. Thanks a lot!
I tried to use pluginsLoaded solution and it works fine. What else commands can I modify the same way? <td> and <tr> too?
There is some info in the
There is some info in the docs:
What is Advanced Content Filter (ACF)?
Allowed Content Rules