Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.26k stars 527 forks source link

Richtext: Replace QuillJs #3891

Open WolfgangKluge opened 2 years ago

WolfgangKluge commented 2 years ago

Is your feature request related to a problem? Please describe. I have several problems with QuillJs, but most annoying https://github.com/quilljs/quill/issues/1074 (quilljs cannot format text like <p>aa<br/>bb</p> but instead outputs <p>aa</p><p><br /></p><p>bb</p>). It would be perfect if blazorise abstracts different editors so we can choose the one that fits best for our needs.

Describe the solution you'd like Ideally, RichText does not allow just a single editor like QuillJs, but multiple ones. E.g. https://tiptap.dev/ seems very viable to me. Alternatively (but that's a breaking change), you may consider switching to a better editor than quilljs (most of the time, quill seems nice and good enough, but sometimes one need more possibilities and quill is very restrictive)

stsrki commented 2 years ago

I like the idea of having everything abstracted. But since that would be a breaking change it will not come any time soon. For v2 or even v3, it would require some time to do. And possibly some existing APIs would have to be dropped in case other editor doesn't support them.

BartjeD commented 1 year ago

RoosterJS is a Microsoft supported Richtext editor. It's free and in my experience better than Quill. A downside is you need to make the editor toolbar yourself. But that could be templated, perhaps.

It also outputs HTML properly and also interfaces with MS word, Excel etc...

RoosterJS: https://github.com/microsoft/roosterjs

stsrki commented 1 year ago

It's not very good-looking, but I like how it has so many features—going on the list.

njannink commented 1 year ago

This RoosterJS is indeed very promising. Since QuillJS isn't maintained anymore might be good to start looking at alternatives. Also a good alternative is TinyMCE, but that means we don't have to do anything because TinyMCE ships it's own blazor library.

njannink commented 1 year ago

The best would be to start a new extension Blazorise.RichTextEdit.Rooster and deprecate the old RichTextEdit sometime in the future.

stsrki commented 1 year ago

That's a good approach. Lately, I have been thinking of making extensions more similar to the Core library. Have them abstracted so that third-party libraries don't leak to the API.

For example:

Since it is a breaking change, it could only be done in v2.

njannink commented 1 year ago

for a v2 I would stop supporting Quill completely. I believe it has security leaks

stsrki commented 1 year ago

Well, as long as be abstract good enough, users can choose the editor they want without breaking anything.

njannink commented 1 year ago

I'm working on getting roosterjs working. It's quite straightforward. I think it is not needed to include a RTE toolbar but just support the actions on the API so users can build\style their own toolbar. This will also reduce the complexity of the RTE component a lot. What do you think @stsrki?

stsrki commented 1 year ago

@njannink In the long run; it would be good to have the API as close to what we currently have. But in any case, as you already mentioned, the first step would be to have a list of actions on the editor that the users can invoke.

stsrki commented 5 months ago

Another alternative https://github.com/basecamp/trix