CKEDITOR.filter.transformationsTools
Singleton containing tools useful for transformation rules.
Filtering
Methods
alignmentToAttribute( element )CKEDITOR.filter.transformationsTools#alignmentToAttributeConverts the
floatstyle to thealignattribute if not set. The style is always removed.Parameters
element : element
alignmentToStyle( element )CKEDITOR.filter.transformationsTools#alignmentToStyleConverts the
alignattribute to thefloatstyle if not set. The attribute is always removed.Parameters
element : element
lengthToAttribute( element, styleName, [ attrName ] )CKEDITOR.filter.transformationsTools#lengthToAttributeConverts length in the
styleNamestyle to a valid length attribute (likewidthorheight).Parameters
element : elementstyleName : StringThe name of the style that will be converted.
[ attrName ] : StringThe name of the attribute into which the style will be converted.
Defaults to
styleName
lengthToStyle( element, attrName, [ styleName ] )CKEDITOR.filter.transformationsTools#lengthToStyleConverts length in the
attrNameattribute to a valid CSS length (likewidthorheight).Parameters
element : elementattrName : StringName of the attribute that will be converted.
[ styleName ] : StringName of the style into which the attribute will be converted.
Defaults to
attrName
matchesStyle( element, style )CKEDITOR.filter.transformationsTools#matchesStyleChecks 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 : elementstyle : style
sizeToAttribute( element )CKEDITOR.filter.transformationsTools#sizeToAttributesizeToStyle( element )CKEDITOR.filter.transformationsTools#sizeToStylesplitBorderShorthand( element )CKEDITOR.filter.transformationsTools#splitBorderShorthandConverts the shorthand form of the
borderstyle to seperate styles.Parameters
element : element
splitMarginShorthand( element )CKEDITOR.filter.transformationsTools#splitMarginShorthandConverts the shorthand form of the
marginstyle to separate styles.Parameters
element : element
transform( el, form )CKEDITOR.filter.transformationsTools#transformTransforms an element to a given form.
Form may be a:
- CKEDITOR.style,
- string – the new name of the element.
Parameters
el : elementform : style | String