Availability: >= 3.0

Type: Object Property

Description: Adds a style to the style menu.


$editor->addStyle string $tagstring $label );


An HTML tag name followed by optional attributes. When this item is selected from the menu it will wrap the selection in the specified tag and add the specified attributes. The special tag name of *block* indicates that the attributes should be applied to any block level element rather than a specific one.

Label to appear on the menu.


$editor->addStyle('span class="highlight"''Highlighted');

See also:

stylesMenu, removeStyle, clearStylesMenu