Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement lists #86

Closed
4 of 6 tasks
bantic opened this issue Aug 18, 2015 · 1 comment · Fixed by #94
Closed
4 of 6 tasks

implement lists #86

bantic opened this issue Aug 18, 2015 · 1 comment · Fixed by #94
Assignees

Comments

@bantic
Copy link
Collaborator

bantic commented Aug 18, 2015

A list section is different from other markup sections because it has sub-elements that are not markers.

A normal markup section has (a linked-list of) markers:
markupSection -> markers

But a list section has list items which have markers:
listSection -> listItems -> markers

To accommodate lists, the Abstract Tree (AT) will need to be able to traverse the leaf nodes (markers) of the tree — for semantic actions like splitting/joining sections and markers — without assuming that the max depth of children is always going to be 1.

  • editor-dom renderer can render list sections and list items
  • mobiledoc parser can parse list sections and list items
  • mobiledoc dom renderer can render list sections and items
  • mobiledoc html renderer can render list sections and items
  • Post parser must be able to reparse list sections
  • Actions on the post editor like splitMarkers must be able to handle markers that have a depth > 1

Creating a list will happen the same way that other section types are created: Click a toolbar button. Eventually (#87) also via text-expansion.
Exiting a list happens by hitting enter when the cursor is in the last item in a list and it is empty (this is how google docs works, too).

For now, only singly-nested lists (this is how medium does it).

@bantic
Copy link
Collaborator Author

bantic commented Aug 18, 2015

WIP on the lists branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant