list/todolist/todolistconverters
@ckeditor/ckeditor5-list/src/todolist/todolistconverters
Filtering
Functions
-
dataModelViewInsertion( model ) → function
module:list/todolist/todolistconverters~dataModelViewInsertion
A model-to-view converter for the
listItem
model element insertion.It is used by
DataController
.Parameters
model : Model
Model instance.
Returns
function
Returns a conversion callback.
Related:
-
dataViewModelCheckmarkInsertion( evt, data, conversionApi )
module:list/todolist/todolistconverters~dataViewModelCheckmarkInsertion
A view-to-model converter for the checkbox element inside a view list item.
It changes the
listType
of the modellistItem
to atodo
value. When a view checkbox element is marked as checked, an additionaltodoListChecked="true"
attribute is added to the model item.It is used by
DataController
.Parameters
evt : EventInfo
An object containing information about the fired event.
data : Object
An object containing conversion input, a placeholder for conversion output and possibly other values.
conversionApi : UpcastConversionApi
Conversion interface to be used by the callback.
Related:
-
mapModelToViewPosition( view ) → function
module:list/todolist/todolistconverters~mapModelToViewPosition
A model-to-view position at zero offset mapper.
This helper ensures that position inside todo-list in the view is mapped after the checkbox.
It only handles the position at the beginning of a list item as other positions are properly mapped be the default mapper.
Parameters
view : View
Returns
function
-
modelViewChangeChecked( onCheckedChange ) → function
module:list/todolist/todolistconverters~modelViewChangeChecked
A model-to-view converter for the
todoListChecked
attribute change on thelistItem
model element.It marks the checkbox UI element as checked.
It is used by
EditingController
.Parameters
onCheckedChange : function
Callback fired after clicking the checkbox UI element.
Returns
function
Returns a conversion callback.
Related:
-
modelViewChangeType( onCheckedChange, view ) → function
module:list/todolist/todolistconverters~modelViewChangeType
A model-to-view converter for the
listType
attribute change on thelistItem
model element.This change means that the
<li>
element parent changes to<ul class="todo-list">
and a checkbox UI element is added at the beginning of the list item element (or vice versa).This converter is preceded by
modelViewChangeType
and followed bymodelViewMergeAfterChangeType
to handle splitting and merging surrounding lists of the same type.It is used by
EditingController
.Parameters
onCheckedChange : function
Callback fired after clicking the checkbox UI element.
view : View
Editing view controller.
Returns
function
Returns a conversion callback.
Related:
-
modelViewInsertion( model, onCheckboxChecked ) → function
module:list/todolist/todolistconverters~modelViewInsertion
A model-to-view converter for the
listItem
model element insertion.It converts the
listItem
model element to an unordered list with a checkbox element at the beginning of each list item. It also merges the list with surrounding lists (if available).It is used by
EditingController
.Parameters
model : Model
Model instance.
onCheckboxChecked : function
Callback function.
Returns
function
Returns a conversion callback.
Related:
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.