Add a rich-text field type.
Rich text fields display a Tiptap editor and are saved as HTML.
TODO:
- vendor Tiptap library
- make it look good
- clean up code (I made this by copying the markdown impl, so there's a lot of dead code right now)
tiptap-editor into main Add a rich-text field type.
Rich text fields display a Tiptap editor and are saved as HTML.
TODO:
I just tested it and it's really great! I love the integration with markdown syntax.
code.css to rich-text.css and change the class names to (.tiptap instead of .cm-editor).<code> or <dl>, for example. Maybe there should be be a way to see and edit the code directly?Yeah, I'll get to styling now.
Editing HTML code could be possible, but a bit of work (Tiptap has its own content model separate from HTML, but it gives us functions to convert back and forth).
For <code>, you can use backticks, and we can add a button for it as well. Unfortunately I don't see a way to do <dl>.
Oh, I didn't realized markdown you can write directly markdown and it's converted automatically to HTML. That's fantastic.
Would be possible to add images? In markdown, images and other media elements are detected automatically on paste urls using this function.
Is it possible to have something similar here? Ideally, a dialog to add the source and alt would be great, but we can start with something simpler.
Hi. I tried to test your latest changes but it fails in my local because the markup_util.js file is not found.
Let me know if you have any question or need some help.
I couldn't figure out the library build setup. markup_util.js is in scripts/
@ -0,0 +1,146 @@
import {
This file doesn't exist
@ -0,0 +1,146 @@
import {
Can you bundle all these external imports to a new file in scripts/tiptap.js and create a build script in scripts/package.json?
You can use markdown.js or code.js as a reference. They only exports a single init function (using a textarea to get and update the content). This allows to edit the code even if the script fails, because the textarea is visible.
Hi!
Just to clarify: are you still working on this? If you are, there's no rush, I just want to know.
I'm asking because if you can't continue, I could.
Hi, sorry about that, I had to leave this for a while.
I haven't figured out how to implement full snippet support, if that's not needed then I think this is ready
I think we can skip snippets for now.
Thank you!
No due date set.
No dependencies set.
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?