CKEDITOR.plugins.pastefromword.styles.inliner
Filtering
Properties
-
filtered : String[]private
Styles skipped by the styles inliner.
Defaults to
['break-before', 'break-after', 'break-inside', 'page-break', 'page-break-before', 'page-break-after', 'page-break-inside']
Methods
-
filter( stylesObj ) → Objectsince 4.7.0 private
Filters out all unnecessary styles.
Parameters
stylesObj : ObjectAn object containing parsed CSS declarations as property/value pairs (see parse).
Returns
ObjectThe
stylesObjcopy with specific styles filtered out.
-
Finds and inlines all the
styleelements in a givenhtmlstring and returns a document where all the styles are inlined into appropriate elements.This is needed because sometimes Microsoft Word does not put the style directly into the element, but into a generic style sheet.
Parameters
html : StringAn HTML string to be parsed.
Returns
-
parse( styles ) → Arraysince 4.7.0 private
Parses the content of the provided
styleelement.Parameters
styles : element | StringThe
styleelement or CSS text.
Returns
ArrayAn array containing parsed styles. Each item (style) is an object containing two properties: selector – A string representing a CSS selector. styles – An object containing a list of styles (e.g.
{ margin: 0, text-align: 'left' }).
-
sort( stylesArray ) → Arraysince 4.7.0 private
Sorts the given styles array. All rules containing class selectors will have lower indexes than the rest of the rules. Selectors with the same priority will be sorted in a reverse order than in the input array.
Parameters
stylesArray : ArrayAn array of styles as returned from parse.
Returns
ArraySorted stylesArray.