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

Rich Text Editor Thoughts XD #32

Closed
rchrdnsh opened this issue Jun 23, 2023 · 27 comments
Closed

Rich Text Editor Thoughts XD #32

rchrdnsh opened this issue Jun 23, 2023 · 27 comments
Assignees
Labels
enhancement New feature or request P2

Comments

@rchrdnsh
Copy link

rchrdnsh commented Jun 23, 2023

Hi!

So, the rich text editor is something that the teams I am working with will need before we can use Sveltia, and I have some thoughts...

What I ultimately want is a rich text editor where I can create custom svelte components that can be used as "blocks" that the content authors and editors are able to use in the composition of their writing. I want to be able to make custom components for them at their request, and/or offer a library for them to pick and choose from to add to their individual editing experience...

I believe Decep CMS uses Slate under the hood, but there are other more modern solutions like Prose Mirror that you might want to (or already are) considering...

I also recently found some interesting svelte based projects as well that might be useful:

tiptap, of course - https://github.com/ueberdosis/tiptap
svelte wrapper for tiptap - https://github.com/andheller/svelte-tiptap
Editable Website - https://github.com/michael/editable-website
Website for Editable Website to check it out - https://editable.website/
Svelte Prosemirror - https://github.com/TeemuKoivisto/svelte-prosemirror

all cool and interesting projects that I am learning more about to help my own understanding of these things.

Anyway, just wanted to share these resources as you work on rich text editing for Sveltia XD

@kyoshino
Copy link
Member

Yeah, for sure, a rich text editor is what I also need for my clients. The problem is some editor libraries have issues with editing multibyte characters like Chinese, Japanese, Korean and emojis. Anyway, I’ll implement one soonish.

@kyoshino kyoshino self-assigned this Jun 23, 2023
@kyoshino kyoshino added the enhancement New feature or request label Jun 23, 2023
@rchrdnsh
Copy link
Author

oooh, just found about about Lexical from Facebook:

https://github.com/facebook/lexical

...and there is a svelte wrapper, it would seem

https://github.com/umaranis/svelte-lexical

...dunno anything about it yet, tho

starting to learn how Prose Mirror works ATM :-)

@ngdangtu-vn
Copy link

It would be great if you guys can add basic markdown editor.

@gryzzly
Copy link

gryzzly commented Jul 21, 2023

hey, a thought on editors and varying needs – what would be really cool is some guidance/tutorial for how to add custom editing fields widgets – that way we could try with any of the solutions above, and it’d not interfere with an "official" support eventually.

thanks for this project!

@kyoshino
Copy link
Member

kyoshino commented Jul 22, 2023

Hi, thanks for your comments! I’ll try to get this done before my other projects start next month.

@kyoshino kyoshino mentioned this issue Sep 4, 2023
@kyoshino
Copy link
Member

kyoshino commented Sep 4, 2023

Sorry for the delay folks! 🙇🏻 I quickly played around with Lexical and it looked good. No problem with editing Japanese, which is a must for my own clients. I’ll try to include it in the next minor release.

@kyoshino kyoshino added the P2 label Sep 4, 2023
@kyoshino
Copy link
Member

kyoshino commented Sep 8, 2023

As per decaporg/decap-cms#6905 Decap is switching to Plate. We should probably follow suit for plugin compatibility. Japanese (and probably Chinese and Korean) input works well on the Plate demo.

@kyoshino
Copy link
Member

kyoshino commented Sep 8, 2023

Well, but Plate is basically a React library so I have to build the Svelte port from scratch. Lexical is framework agnostic. 🤔

@ngdangtu-vn
Copy link

What about https://quilljs.com ?

@kyoshino
Copy link
Member

kyoshino commented Sep 8, 2023

What about https://quilljs.com ?

It looks pretty simple and framework agnostic, but not sure about the Markdown support. I’ll compare some options mentioned in this thread and make a final decision soon.

@frankbits
Copy link

Well, but Plate is basically a React library so I have to build the Svelte port from scratch. Lexical is framework agnostic. 🤔

maybe this "slate svelte view layer" can help?

@rchrdnsh
Copy link
Author

IIRC Quill is kind of previous generation for rich text editors, and it looks like Plate is react based or only react? In any case I'm thinking Lexical or Prose Mirror / TipTap are maybe good choices...haven't look too deeply into the others however, just a quick glance at their sites...

@rchrdnsh
Copy link
Author

Any updates on the Rich Text Editor progress?

@Natetronn
Copy link

A couple other options I've seen in my adventures, just in case it's of any use:

Editor.js - Svelte Editor.js

Slate - Svelte Slate

@kyoshino
Copy link
Member

Sorry folks for making you wait so long! 🙇🏼 I’m working on this now.

  • Lexical isn’t well documented, but it seems to offer great flexibility. I’m playing around with this.
  • Looks like Quill has been updated very recently for the long-awaited v2 release. I’ll take a look at this as well.
  • Slate is not an option because it has many issues related to IMEs (Chinese, Japanese, Korean and Taiwanese), which is actually one of the reasons my clients wanted to move away from Netlify CMS.

@zanhk
Copy link

zanhk commented Dec 23, 2023

Lexical looks promising

@kyoshino
Copy link
Member

Yeah, I’ll stick with Lexical. Quill 2.0 is still in early beta and having 1.3k+ open issues is concerning.

@rchrdnsh
Copy link
Author

I think lexical has svelte bindings as well, or there is a lib or something, so one could made nodes out of svelte components potentially...

@kyoshino
Copy link
Member

You’ve already pointed out svelte-lexical 🙂 but I’m creating my own to keep using Sveltia UI, integrate the raw Markdown editor, and mimic the toolbar button layout of Netlify/Decap CMS.

image

@rchrdnsh
Copy link
Author

whoops, forgot about that 😁

In any case, thank you for all your hard work on this :-)

@kyoshino kyoshino mentioned this issue Jan 2, 2024
@zanhk
Copy link

zanhk commented Jan 16, 2024

@kyoshino If you need help on this feature ping me!

@zanhk
Copy link

zanhk commented Mar 31, 2024

Hi, is there any update on the Rich Text Editor progress?

@kyoshino
Copy link
Member

kyoshino commented Apr 1, 2024

Another big task (#22) has just been completed, and I’ll be moving this forward shortly.

@zanhk
Copy link

zanhk commented Apr 1, 2024

Nice. Looking forward to this, you should also check out what they used on keystatic because the ability to add custom components in MDX and MDOC is neat

https://keystatic.com/docs/content-components

@kyoshino
Copy link
Member

The long wait is over! Just shipped v0.20.0 to provide a rich text editor! 🚀

@fkrauthan
Copy link

Any plans/idea when additional editor components (and potentially custom components) are becoming available? I would love to have Table support as well as adding a couple of custom components for layouting (e.g. columns) and embedded youtube videos.

@kyoshino
Copy link
Member

kyoshino commented Oct 2, 2024

Editor improvements are now my top priority. The image component is being tracked in #156. Will work on these things this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2
Projects
None yet
Development

No branches or pull requests

8 participants