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

Document / Data editor #2

Closed
joepio opened this issue Feb 5, 2021 · 1 comment
Closed

Document / Data editor #2

joepio opened this issue Feb 5, 2021 · 1 comment

Comments

@joepio
Copy link
Member

joepio commented Feb 5, 2021

The Document is perhaps the most used and versatile concept in sharing information. It contains text, it's flexible, it's linear. It's designed for humans, it reads naturally. Combined with Atomic Data, it could benefit from using externally defined sections and type safe data.

Considerations

  • Results in a UX similar to notion
  • Can be serialized to HTML and Markdown
  • Plays nicely with Atomic Commits and versioning
  • Allows for inline / block specific comments
  • Extensible (add arbitrary types of resources)
  • Copy / paste from and to word / google docs / plaintext would be nice

Inspiration

  • notion.clone tutorial
  • [editorjs.io)(https://editorjs.io/), a block-style editor. Each header / paragraph / thing is a 'block' with its own ID.

Approaches

So how to model and implement it?

Markdown

I love markdown. It's simple, elegant, easy to read, and easy to edit.
But... It's not designed to be extensible.
And it's also kind of costly to parse and render.
And it's un-structured and line based, which means that Atomic Commits will be kind of useless.
So no, I don't think markdown is the way to go.

Using something

Recursive Sections

A Section is a recursive model. Sections can have Sections as children, which can be used for things like chapters or paragraphs. Every time a user presses enter, a new sections

  • Title
  • Plaintext
  • Sections (resourcearray => Section / Image / Resource?)

Documents and Sections

Document:

  • Title
  • Sections (resourcearray => TextBlock / Image / Resouce)
@joepio
Copy link
Member Author

joepio commented Jul 17, 2021

The work has begun! You can check out an early version here.

Some ideas for things to add

  • I can already include external resources, but I'd like to decide how to render these: as a card, a a list item.. Maybe add a ResourceView element with an `
  • Images! Even if uploading images is not yet an option.
  • Todo lists, with toggle feature, and mentions

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

No branches or pull requests

1 participant