geut / caracara

GEUT LABS. An experimental Dat based collaborative editor.
https://caracara.hashbase.io/
32 stars 4 forks source link

Replace textarea with a contenteditable element #7

Open dpaez opened 5 years ago

dpaez commented 5 years ago

This change would allow us to render more complex documents, like markdown docs with media embedded, for example. The ideal contenteditable lib should give an easy way to extract the basic content (i.e.: what user writes) in order to continue using automerge for dealing with that part. If we don't find a lib that met the conditions, then we'll need to update how we are handling the merges, e.g.: add some parse prior passing data to automerge and after reading, then pass that to the contenteditable lib to rebuild the representation.

aslakhellesoy commented 5 years ago

Hi - I’m the author of https://github.com/aslakhellesoy/automerge-codemirror

Perhaps something to consider?

dpaez commented 5 years ago

Hi @aslakhellesoy! 👋

Cool project looks nice. Have you tried integrating automerge with prosemirror instead of codemirror?

I think going in that direction would be better.

aslakhellesoy commented 5 years ago

Hi @dpaez

I haven’t had a use for rich text yet, so I haven’t tried Prosemirror.

Frando commented 5 years ago

there's been some work on using automerge with slate: ept/slate-automerge by @ept, and humandx/slate-automerge.