Interface that may be automatically implemented by any
instance of any class which has at least the
name property and
can be meant as an editor feature.
- "Bold" command, button, and keystroke – it does not mean exactly
<b>but just the ability to create bold text.
- "Format" drop-down list – it also does not imply any HTML tag.
- "Link" command, button, and keystroke.
- "Image" command, button, and dialog window.
Thus most often a feature is an instance of one of the following classes:
This method checks if a feature can be activated (see requiredContent) and if yes, then it registers allowed content rules required by this feature (see allowedContent) along with two kinds of transformations: contentForms and contentTransformations.
By default all buttons that are included in toolbar layout configuration are checked and registered with CKEDITOR.editor.addFeature, all styles available in the 'Format' and 'Styles' drop-down lists are checked and registered too and so on.
contentForms : Object
contentTransformations : Object
name : String
Minimal HTML code that this feature must be allowed to generate in order to work.
For example a basic image feature (image button displaying the image dialog window) needs
'img[src,alt]'in order to be activated.
During the feature validation this value is passed to CKEDITOR.filter.check.
If this value is not provided, a feature will be always activated.
Returns a feature that this feature needs to register.