Integrating Plugins with Advanced Content Filter
CKEditor 4.1 is just around the corner, so it is a final call for all plugin developers to update their code in order to comply with content filtering that the new editor version introduces. CKEditor 4.1 Release Candidate was released on March 6, 2013, and the final release is coming very soon.
What Impact Does ACF Have on Plugins?
Advanced Content Filter (ACF) is a set of rules that determine which editor features will be available to the user. It limits and adapts input data so it matches the editor configuration in the best possible way. It may also deactivate features which generate HTML code that is not allowed by the configuration.
How does it affect plugins? If your plugin generates content, you will need to update it so that it would extend the default CKEditor filters and make the editor accept this content. If, for example, you created a plugin that inserts an <abbr> element into the editor (just like we did in our sample plugin tutorial), you will need to add both this element and any of its attributes that you want to use to allowed content.
Plugin Integration Documentation
To help you with this task, we have created a new "Integrating Plugins with Advanced Content Filter" chapter for our Developer's Guide. This article explains:
- How to add a new content type to ACF.
- What exactly is an editor feature and how a feature can be activated.
- How and where to update your plugin code to specify allowed content.
- How to automatically disable a feature if the content it creates is not allowed.
- How to configure content transformations for your features.
What Will Happen If a Plugin Does Not Comply with ACF?
In short, if content filtering is enabled (and by default it is!), all content that the filter does not allow will be removed by the editor. This is why you need to take care of extending the default Allowed Content Rules so that the editor accepted the content that your plugin generate.