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

Example data structure for rich text editing #44

Open
mitar opened this issue Jun 18, 2015 · 8 comments
Open

Example data structure for rich text editing #44

mitar opened this issue Jun 18, 2015 · 8 comments

Comments

@mitar
Copy link

mitar commented Jun 18, 2015

Hm, how hard would it be to use scuttlebutt for rich text editing? For example, Quill provides nice deltas for changes. Or even support for multiple cursors. How would it be to create a model which would support rich text editing?

@dominictarr
Copy link
Owner

@mitar you probably want something that multiple people can edit in parallel. This is a little bit more comlpicated that what quill appears to provide, but using a structure like https://github.com/dominictarr/r-edit which uses https://github.com/dominictarr/r-array makes editing pretty easy. You could also use a model based on patches.

@dominictarr
Copy link
Owner

@mitar
Copy link
Author

mitar commented Jun 24, 2015

So quill is just an editor, but it is easy to integrate with it. The question is what would be a data structure/model in the background which would allow such rich-text editing.

@dominictarr
Copy link
Owner

ah, so you mean like a string except formatting and fonts are preserved?

@mitar
Copy link
Author

mitar commented Jun 24, 2015

Yes.

@dominictarr
Copy link
Owner

okay so if you can serialize quill's state into json you should be good, but I think that is a question you should ask quill, not secure-scuttlebutt

@mitar
Copy link
Author

mitar commented Jun 24, 2015

So I use https://github.com/vigour-io/gossip-object as a base model for JSON?

@dominictarr
Copy link
Owner

sure, but the important thing is what sort of json structure does quill give you?
for rich text, it's quite likely to be a treeish structure... or maybe a listish structure. listish will be easier, but you have to figure that out.

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

2 participants