CKEDITOR.filter.transformationsTools
Singleton containing tools useful for transformation rules.
Filtering
Methods
-
alignmentToAttribute( element )
CKEDITOR.filter.transformationsTools#alignmentToAttribute
Converts the
float
style to thealign
attribute if not set. The style is always removed.Parameters
element : element
-
alignmentToStyle( element )
CKEDITOR.filter.transformationsTools#alignmentToStyle
Converts the
align
attribute to thefloat
style if not set. The attribute is always removed.Parameters
element : element
-
lengthToAttribute( element, styleName, [ attrName ] )
CKEDITOR.filter.transformationsTools#lengthToAttribute
Converts length in the
styleName
style to a valid length attribute (likewidth
orheight
).Parameters
element : element
styleName : String
The name of the style that will be converted.
[ attrName ] : String
The name of the attribute into which the style will be converted.
Defaults to
styleName
-
lengthToStyle( element, attrName, [ styleName ] )
CKEDITOR.filter.transformationsTools#lengthToStyle
Converts length in the
attrName
attribute to a valid CSS length (likewidth
orheight
).Parameters
element : element
attrName : String
Name of the attribute that will be converted.
[ styleName ] : String
Name of the style into which the attribute will be converted.
Defaults to
attrName
-
matchesStyle( element, style )
CKEDITOR.filter.transformationsTools#matchesStyle
Checks whether an element matches a given CKEDITOR.style. The element can be a "superset" of a style, e.g. it may have more classes, but needs to have at least those defined in the style.
Parameters
element : element
style : style
-
sizeToAttribute( element )
CKEDITOR.filter.transformationsTools#sizeToAttribute
-
sizeToStyle( element )
CKEDITOR.filter.transformationsTools#sizeToStyle
-
splitBorderShorthand( element )
CKEDITOR.filter.transformationsTools#splitBorderShorthand
Converts the shorthand form of the
border
style to seperate styles.Parameters
element : element
-
splitMarginShorthand( element )
CKEDITOR.filter.transformationsTools#splitMarginShorthand
Converts the shorthand form of the
margin
style to separate styles.Parameters
element : element
-
transform( el, form )
CKEDITOR.filter.transformationsTools#transform
Transforms an element to a given form.
Form may be a:
- CKEDITOR.style,
- string – the new name of the element.
Parameters
el : element
form : style | String