Get your own copy
Don't hesitate! Just download and test it all by yourself for free!
// Sets styles on all paragraphs in the currently active editor
tinyMCE.activeEditor.dom.setStyles(tinyMCE.activeEditor.dom.select('p'), {'background-color' : 'red', 'color' : 'green'});
// Sets styles to an element by id in the current document
tinyMCE.DOM.setStyles('mydiv', {'background-color' : 'red', 'color' : 'green'});
| Name | Type | Description |
|---|---|---|
| e | Element/String/Array | DOM element, element id string or array of elements/ids to set styles on. |
| o | Object | Name/Value collection of style items to add to the element(s). |
Search documentation.