list/list/utils/view
@ckeditor/ckeditor5-list/src/list/utils/view
Filtering
Functions
-
internal
createListElement( writer, indent, type, id ) → AttributeElement
module:list/list/utils/view~createListElement
Creates a list attribute element (ol or ul).
Parameters
writer : DowncastWriter
indent : number
type : ListType
id : string
-
Defaults to
...
Returns
-
internal
createListItemElement( writer, indent, id ) → AttributeElement
module:list/list/utils/view~createListItemElement
Creates a list item attribute element (li).
Parameters
writer : DowncastWriter
indent : number
id : string
Returns
-
Calculates the indent value for a list item. Handles HTML compliant and non-compliant lists.
Also, fixes non HTML compliant lists indents:
before: fixed list: OL OL |-> LI (parent LIs: 0) |-> LI (indent: 0) |-> OL |-> OL |-> OL | | |-> OL | | |-> OL | | |-> LI (parent LIs: 1) |-> LI (indent: 1) |-> LI (parent LIs: 1) |-> LI (indent: 1) before: fixed list: OL OL |-> OL | |-> OL | |-> OL | |-> LI (parent LIs: 0) |-> LI (indent: 0) before: fixed list: OL OL |-> LI (parent LIs: 0) |-> LI (indent: 0) |-> OL |-> OL |-> LI (parent LIs: 0) |-> LI (indent: 1)
Parameters
listItem : Element
Returns
number
-
internal
getViewElementIdForListType( [ type ], [ indent ] ) → string
module:list/list/utils/view~getViewElementIdForListType
Returns a view element ID for the given list type and indent.
Parameters
[ type ] : ListType
[ indent ] : number
Returns
string
-
internal
getViewElementNameForListType( [ type ] ) → 'ol' | 'ul'
module:list/list/utils/view~getViewElementNameForListType
Returns a view element name for the given list type.
Parameters
[ type ] : ListType
Returns
'ol' | 'ul'
-
Checks if view element is a list item (li).
Parameters
viewElement : Node | DocumentFragment
Returns
boolean
-
Checks if view element is a list type (ul or ol).
Parameters
viewElement : Node | DocumentFragment
Returns
boolean
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.