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

Editor structure #1

Open
mrtcode opened this issue Jul 16, 2020 · 0 comments
Open

Editor structure #1

mrtcode opened this issue Jul 16, 2020 · 0 comments

Comments

@mrtcode
Copy link
Member

mrtcode commented Jul 16, 2020

The note structure dictates what information is lost when importing the wild HTML structure of old notes. Basically, what is not predefined in the schema - is lost. Well, not the actual data (like text or images) will be lost, but the layout and formatting.

Nesting different content nodes (like image in table, list in table, table in blockquote, etc.) results to sophisticated, tree-like note structure which might be a bad thing if we want to keep the editor simple. Additionally it reduces granularity for the top level elements which will be treated as blocks for the future sync. The best would be to have each block responsible for a single data type.

Problematic elements

Table

Implementation variants:

  1. Dumb table - a super simple table with just two fixed columns and no or basic formatting supported in the cells
  2. Feature complete table - a table that supports any number of columns and rows, supports merging and splitting cells, and only a basic formatting
  3. Nested table - where each cell supports images, lists, citations, highlights, other tables, well, you can put the whole document in the cell

Image

Implementation variants:

  1. Image block - image as a top level block only
  2. Multi-image block - a top level block that can contain multiple images stacked horizontally, where the images can be dragged in or out
  3. Nesting anywhere - nesting images in paragraphs, tables, lists, etc.

Notices:

  • If images are top level blocks only, on the import, all nested images will be pulled out and flattened as top level elements
  • Old images with urls will be completely removed, although we can consider to load them and import as attachments
  • Old images with data urls will be imported as image attachments
  • What applies for images will apply for formulas as well (when/if they will be implemented)

List

  1. Basic list - a list with a basic formatting
  2. Nested list - a list that can have anything as an item i.e. images, tables, blockquotes, etc.

Blockquote

  1. Simple blockquote - only a basic text formatting supported in the blockquote
  2. Nested blockquote - supports lists, citations, highlights, images, tables, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant