This PR is related to #75 issue
This PR is result of global work on List 2.0
Problems
Could not use List or Checklist data format for Nested List
Can not use cheklist as style of the nested list
Data model has no place for meta (e. g. checked field for checklist)
Nesting is not customizable
Can not start ordered list with custom variable
Can not change counters for ordered list
Can not split list on enter in the empty item in the midle of the list
Does not support backspace on the start of the first item
Nesting works unexpected sometimes
One file architecture
Shortcut fails to make defaultStyle effective
defaultStyle is not respected by toolbox
Solutions
Implement checklist as style of the nested list
Support new data model with meta attribute for each item:
interface ListItem {
content: string;
meta: OrderedListMeta | UnorderedListMeta | ChecklistMeta; // meta should depend on list type
items: ListItem[];
}
Separate List rendering and tabulation (rendered should render items and wrappers dependant on list style), tabulator should handle keydowns and work with editor events
Rerender list, when style changed
Export all list styles to toolbox
Implement data converter from old List and Checklist formats to new Nested List
Support nesting customisation by maxLevel config option
Support <ol> attributes, in config (such as type, start)
Status
[x] Separate rendering and tabulation
[x] Support checklist for #11
[x] List rerendering on style change
[x] Support new data model
[x] Add nesting customisation for #80
[x] Add ordered list customisation for #66
[x] Refactor keydown behaviour
[x] Backspace at beginning of first list item for #27, #43
[x] Backspace in empty list item for #28
[x] Split list on enter in emtpy item for #30
[x] Merge parapraph with list on backspace in parapraph for #32
[x] Export all list styles into toolbox for #70
[x] Support Checklist and List data models for #87, #15
This PR is related to #75 issue This PR is result of global work on List 2.0
Problems
enter
in the empty item in the midle of the listdefaultStyle
is not respected by toolboxSolutions
Support new data model with meta attribute for each item:
List
andChecklist
formats to new Nested List<ol>
attributes, in config (such astype
,start
)Status
Checklist
andList
data models for #87, #15resolves #11 resolves #15 resolves #27 resolves #28 resolves #30 resolves #32 resolves #43 resolves #66 resolves #70 resolves #75 resolves #80 resolves #87