Create a selector based input filter for an editor instance with editor.filters.selector.addInput()
.
The selector based input filter modifies content added to an editor with: textboxio.replace()
,
editor.content.set()
, editor.content.insertHtmlAtCursor()
.
Example
editor.filters.selector.addInput(selector, callback)
// Create an input filter for elements with class 'blue' that strips classes from identified elements editor.filters.selector.addInput('.blue', function(elements) { elements.forEach(function(element) { element.className = ""; }); });
Parameters
selector | String | Specify a CSS3 selector representing the elements you wish to pass to the filter. |
callback | Function | Specify a function to process the array of matched elements. |
Returns
No return value.