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

Feature: RichTextEdit based on roosterjs #4693

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

njannink
Copy link
Contributor

No description provided.

@njannink
Copy link
Contributor Author

Still lot of work to do, but it's easy to create a rooster editor. I added a utility function for loading scripts on demand. Some similar logic is also present in the old RichTextEdit, but I think this way is more elegant

@stsrki
Copy link
Collaborator

stsrki commented Mar 24, 2023

By a quick glance at the code, it seems like a clean solution.

@stsrki
Copy link
Collaborator

stsrki commented Mar 29, 2023

I'm testing the PR. Not sure if I can't find it or if it doesn't exist at all. Does roosterjs have a way of defining the UI buttons internally? Or must users create them and then connect them with the API calls?

@njannink
Copy link
Contributor Author

I will do another push soon to show how it works. roosterjs doesn't have any toolbar functionality. So you have to build your own bar. But that will give all the styling and customization options to the user so I think its actually good. Keybindings do work out of the box like Ctrl+B etc

<Buttons>
   <Button Clicked="() => rte.Format(Action.Bold)">B</Button>
   <Button Clicked="() => rte.Format(Action.Italic)">I</Button>
   <Button Clicked="() => rte.Format(Action.Underline)">U</Button>
</Buttons>
<RichTextEdit @ref="rte" />

@njannink
Copy link
Contributor Author

this is still on my todo list. I hope to be able to pick this up again sometime soon to be able to merge away from QuillJS

@stsrki
Copy link
Collaborator

stsrki commented Oct 18, 2023

@njannink What do you think of this? #5077

@njannink
Copy link
Contributor Author

@stsrki I have been working a bit on this again. Have a look at the command system that I added. This will allow users to bind buttons, drop-downs etc to formatting command and gives you the option to build your own toolbar. Maybe we could ship a few predefined toolbars/layouts to make it easier to start using.

Still quite some work to do and some commands don't work somehow

@stsrki
Copy link
Collaborator

stsrki commented Mar 13, 2024

You made a lot of work this time. Thanks. Will look into it.

Btw, I was thinking a lot about RTE, and I think for the future, maybe in Blazorise v2 it would be best to organize RTE similar to core Blazorise. And then have each implementation separate of the core project.

eg.

  • Blazorise.RichTextEdit
  • Blazorise.RichTextEdit.Quill
  • Blazorise.RichTextEdit.Rooster

@njannink
Copy link
Contributor Author

You made a lot of work this time. Thanks. Will look into it.

Btw, I was thinking a lot about RTE, and I think for the future, maybe in Blazorise v2 it would be best to organize RTE similar to core Blazorise. And then have each implementation separate of the core project.

eg.

  • Blazorise.RichTextEdit
  • Blazorise.RichTextEdit.Quill
  • Blazorise.RichTextEdit.Rooster

I have looked at this a bit, but there is limited common ground between the 2 editors. QuillJS really comes with a buildin toolbar etc and Rooster doesn't. So yes it might be good to rename the current RichTextEdit to RichTextEdit.Quill, but I think that a common library doesn't add that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants