| Namespace | tinymce |
| Class | Formatter |
| Method | Defined By |
|---|---|
|
apply(name:String, vars:Object, node:Node):void
Applies the specified format to the current selection or specified node.
|
Formatter |
|
canApply(name:String):boolean
Returns true/false if the specified format can be applied to the current selection or not.
|
Formatter |
|
get(name:String):Array/Object
Returns the format by name or all formats if no name is specified.
|
Formatter |
|
match(name:String, vars:Object, node:Node):boolean
Matches the current selection or specified node against the specified format name.
|
Formatter |
|
matchAll(names:Array, vars:Object):Array
Matches the current selection against the array of formats and returns a new array with matching formats.
|
Formatter |
|
matchNode(node:Node, name:String, vars:Object, similar:Boolean):Object
Return true/false if the specified node has the specified format.
|
Formatter |
|
register(name:Object/String, format:Object/Array):void
Registers a specific format by name.
|
Formatter |
|
remove(name:String, vars:Object, node:Node):void
Removes the specified format from the current selection or specified node.
|
Formatter |
|
toggle(name:String, vars:Object, node:Node):void
Toggles the specified format on/off.
|
Formatter |
public
function apply(name:String, vars:Object, node:Node):void
| name:String | Name of format to apply. |
| vars:Object | Optional list of variables to replace within format before applying it. |
| node:Node | Optional node to apply the format to defaults to current selection. |
public
function canApply(name:String):boolean
| name:String | Name of format to check. |
public
function get(name:String):Array/Object
| name:String | Optional name to retrive by. |
public
function match(name:String, vars:Object, node:Node):boolean
| name:String | Name of format to match. |
| vars:Object | Optional list of variables to replace before checking it. |
| node:Node | Optional node to check. |
public
function matchAll(names:Array, vars:Object):Array
| names:Array | Name of format to match. |
| vars:Object | Optional list of variables to replace before checking it. |
public
function matchNode(node:Node, name:String, vars:Object, similar:Boolean):Object
| node:Node | Node to check the format on. |
| name:String | Format name to check. |
| vars:Object | Optional list of variables to replace before checking it. |
| similar:Boolean | Match format that has similar properties. |
public
function register(name:Object/String, format:Object/Array):void
| name:Object/String | Name of the format for example "bold". |
| format:Object/Array | Optional format object or array of format variants can only be omitted if the first arg is an object. |
public
function remove(name:String, vars:Object, node:Node):void
| name:String | Name of format to remove. |
| vars:Object | Optional list of variables to replace within format before removing it. |
| node:Node | Optional node to remove the format from defaults to current selection. |
public
function toggle(name:String, vars:Object, node:Node):void
| name:String | Name of format to apply/remove. |
| vars:Object | Optional list of variables to replace within format before applying/removing it. |
| node:Node | Optional node to apply the format to or remove from. Defaults to current selection. |