CKEDITOR.plugins.pastetools.filters.common.styles.inliner
Filtering
Properties
-
since 4.13.0 private
filtered : String[]
CKEDITOR.plugins.pastetools.filters.common.styles.inliner#filtered
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
-
since 4.13.0 private
filter( stylesObj ) → Object
CKEDITOR.plugins.pastetools.filters.common.styles.inliner#filter
Filters out all unnecessary styles.
Parameters
stylesObj : Object
An object containing parsed CSS declarations as property/value pairs (see parse).
Returns
Object
The
stylesObj
copy with specific styles filtered out.
-
since 4.13.0 private
inline( html ) → document
CKEDITOR.plugins.pastetools.filters.common.styles.inliner#inline
Finds and inlines all the
<style>
elements in a givenhtml
string 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 : String
An HTML string to be parsed.
Returns
document
-
since 4.13.0 private
parse( styles ) → Array
CKEDITOR.plugins.pastetools.filters.common.styles.inliner#parse
Parses the content of the provided
<style>
element.Parameters
styles : element | String
The
<style>
element or CSS text.
Returns
Array
An 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' }
).
-
since 4.13.0 private
sort( stylesArray ) → Array
CKEDITOR.plugins.pastetools.filters.common.styles.inliner#sort
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 : Array
An array of styles as returned from parse.
Returns
Array
Sorted
stylesArray
.