Replace editor vue-easymde with tiptap #1834
Labels
No Label
dependencies
duplicate
help wanted
invalid
kind/bug
kind/feature
needs reproduction
question
security
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/vikunja#1834
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think for the longterm tiptap is a nice editor: V2 is in beta, but seems quite stable, v1 was just for vue so should be a good fit.
I originally thought that the library tiptap is based on — Prosemirror) — isn't updated that often anymore. I was mistaken. There is a lot of development happening right now. Looks really good!
Only problem: Tiptap 2 doesn't support Markdown as input / output, which makes sense. This will make some changes in the api neccessary. This is probably something that should wait until the vue3 transition is over. TipTap does support Markdown syntax while editing though.
The collaborative editing might also be intersting for the future. It might help with conflicting task edits, depending on how this is supposed to be implemented.
Maybe it's too overpowered for that usecase.
Honorable Mentions
Just for react: slate
not enough maintenance: editorjs -> https://github.com/factly/dega/discussions/378
I think tiptap would be great. There are markdown bindings for it: https://tiptap.dev/examples/markdown-shortcuts
The api doesn't make any assumptions about the format of the text. We could either just continue saving it in markdown, even when tiptap doesn't save it in markdown. Would be quite a bit of converting - to discuss?
What do you mean by that? Convert the html /json output back to markdown (depending on implementation)? If we don't do that we can save a library in the frontend.
Pretty much, yes.
But I've just read up on the tiptap docs on output formats and I think what they say makes sense. HTML looks the better option. I'd like to use HTML instead of Markdown because that's a format other possible clients can work with which can be complicated when using the JSON output.
Makes sense. That should also be compatible with any editor in the future.
I guess the transition is still tricky.
All the markdown fields would either need to be converted to html or we would need a strategy to detect if a field got updated already (seems very tricky) and if not do this on the fly. Another option would be to have a separate field that saves if it got already updated.
I guess you already did some data model migrations before. How did you approach this back then?
I think we could just write an API migration to convert all descriptions and comments from Markdown to HTML. That's a bit agains clear separation of concerns but should be fine.
If you see it as a change of the data model (which it kind of is) I guess even separation of concerns is fine :D
More discussion: https://community.vikunja.io/t/images-pasted-into-text-fields-like-description-or-a-comment/470?u=kolaente
Replace vue-easymde with a better editorto Replace editor vue-easymde with tiptapA old pull request that needs to be rebased: vikunja/frontend#2222