Namespace | tinymce.html |
Class | Schema |
Method | Defined By |
---|---|
Schema(settings:Object)
Constructs a new Schema instance.
|
Schema |
addCustomElements(custom_elements:String):void
Adds custom non HTML elements to the schema.
|
Schema |
addValidChildren(valid_children:String):void
Parses a valid children string and adds them to the schema structure.
|
Schema |
addValidElements(valid_elements:String):void
Parses a valid elements string and adds it to the schema.
|
Schema |
getBlockElements():Object
Returns a map with block elements.
|
Schema |
getBoolAttrs():Object
Returns a map with boolean attributes.
|
Schema |
getCustomElements():Object
Returns an map object of all custom elements.
|
Schema |
getElementRule(name:String):Object
Returns true/false if the specified element is valid or not according to the schema.
|
Schema |
getNonEmptyElements():Object
Returns a map with elements that should be treated as contents regardless if it has text content in them or not such as ...
|
Schema |
getSelfClosingElements():Object
Returns a map with self closing tags such as .
|
Schema |
getShortEndedElements():Object
Returns a map with short ended elements such as BR or IMG.
|
Schema |
getTextBlockElements():Object
Returns a map with text block elements.
|
Schema |
getWhiteSpaceElements():Object
Returns a map with elements where white space is to be preserved like PRE or SCRIPT.
|
Schema |
isValid(name:String, attr:String):Boolean
Returns true/false if the specified element name and optional attribute is valid according to the schema.
|
Schema |
isValidChild(name:String, child:String):Boolean
Returns true/false if the specified element and it's child is valid or not according to the schema.
|
Schema |
setValidElements(valid_elements:String):void
Parses a valid elements string and sets it to the schema.
|
Schema |
public
function Schema(settings:Object)
settings:Object | Name/value settings object. |
public
function addCustomElements(custom_elements:String):void
custom_elements:String | Comma separated list of custom elements to add. |
public
function addValidChildren(valid_children:String):void
valid_children:String | Valid children elements string to parse |
public
function addValidElements(valid_elements:String):void
valid_elements:String | String in the valid elements format to be parsed. |
public
function getBlockElements():Object
public
function getBoolAttrs():Object
public
function getCustomElements():Object
public
function getElementRule(name:String):Object
name:String | Element name to check for. |
public
function getNonEmptyElements():Object
public
function getSelfClosingElements():Object
public
function getShortEndedElements():Object
public
function getTextBlockElements():Object
public
function getWhiteSpaceElements():Object
public
function isValid(name:String, attr:String):Boolean
name:String | Name of element to check. |
attr:String | Optional attribute name to check for. |
public
function isValidChild(name:String, child:String):Boolean
name:String | Element name to check for. |
child:String | Element child to verify. |
public
function setValidElements(valid_elements:String):void
valid_elements:String | String in the valid elements format to be parsed. |