CKEDITOR.plugins.pastetools.filters.word.lists
Filtering
Properties
-
Numbering helper.
Methods
since 4.13.0 private
calculateValue( element ) → NumberCKEDITOR.plugins.pastetools.filters.word.lists#calculateValueCalculates the value for a given
<li>element based on preceding list items (e.g. thevalueattribute). It could also look at the start attribute of its parent list (<ol>).Parameters
element : elementThe
<li>element.
Returns
Number
since 4.13.0 private
chopDiscontinuousLists( list, lists )CKEDITOR.plugins.pastetools.filters.word.lists#chopDiscontinuousListsConverts a single, flat list items array into an array with a hierarchy of items.
As the list gets chopped, it will be forced to render as a separate list, even if it has a deeper nesting level. For example, for level 3 it will create a structure like
ol > li > ol > li > ol > li.Note that list items within a single list but with different levels that did not get chopped will still be rendered as a list tree later.
Parameters
list : element[]An array containing list items.
lists : element[]All the lists in the pasted content represented by an array of arrays of list items. Modified by this method.
-
since 4.13.0 private
convertToFakeListItem( editor, element )CKEDITOR.plugins.pastetools.filters.word.lists#convertToFakeListItemConverts an element to an element with the
cke:litag name.Parameters
editor : editorelement : element
since 4.13.0 private
convertToRealListItems( root ) → element[]CKEDITOR.plugins.pastetools.filters.word.lists#convertToRealListItemsConverts any fake list items contained within
rootinto real<li>elements.Parameters
root : element
Returns
element[]An array of converted elements.
since 4.13.0 private
createLists( root, editor ) → element[]CKEDITOR.plugins.pastetools.filters.word.lists#createListsParameters
root : elementAn element to be looked through for lists.
editor : editorThe editor instance.
Returns
element[]An array of created list items.
since 4.13.0 private
determineListItemValue( element )CKEDITOR.plugins.pastetools.filters.word.lists#determineListItemValueTries to determine the
li[value]attribute for a given list item. Theelementgiven must have a parent in order for this function to work properly.Parameters
element : element
since 4.13.0 private
dissolveList( element )CKEDITOR.plugins.pastetools.filters.word.lists#dissolveListsince 4.13.0 private
getListItemInfo( list ) → ObjectCKEDITOR.plugins.pastetools.filters.word.lists#getListItemInfoReturns Word-generated information about the given list item, mainly by parsing the
mso-listCSS property.Note: Paragraphs with
mso-listare also counted as list items because Word serves list items as paragraphs.Parameters
list : element
Returns
Objectret
since 4.13.0 private
getSymbolInfo( symbol, type ) → ObjectCKEDITOR.plugins.pastetools.filters.word.lists#getSymbolInfoReturns an object describing the given
symbol.Parameters
symbol : Stringtype : String
Returns
Objectret
since 4.13.0 private
isAListContinuation( listElement ) → BooleanCKEDITOR.plugins.pastetools.filters.word.lists#isAListContinuationChecks if this list is a direct continuation of a list interrupted by a list with a different ID and with a different level. So if you look at the following list:
- list1 level1
- list1 level1
- list2 level2
- list2 level2
- list1 level1
It would return
true, which means it is a continuation, and should not be chopped. However, if any paragraph or anything else appears in-between, it should be broken into different lists.You can see fixtures from issue https://dev.ckeditor.com/ticket/7918 as an example.
Parameters
listElement : elementThe list to be checked.
Returns
Boolean
since 4.13.0 private
thisIsAListItem( editor, element ) → BooleanCKEDITOR.plugins.pastetools.filters.word.lists#thisIsAListItemChecks if a given element is a list item-alike.
Parameters
editor : editorelement : element
Returns
Boolean