Blazored / TextEditor

Rich text editor for Blazor applications - Uses Quill JS
MIT License
276 stars 58 forks source link

Enable setting the list of supported editor formats #43

Closed goodsky closed 3 years ago

goodsky commented 3 years ago

QuillJS supports setting the text format options in the editor area. This change wires that feature up into the Blazor Interop layer. This is useful when I only want to show a subset of the QuillJS format options on my editor.

ADefWebserver commented 3 years ago

The way this is coded now, it is a breaking change. Can you make the parameter optional (and handle if it is not passed all the way to the call to the JavaScript).

It is important that a person, who has the control working fine in their Blazor app, doesn't do a "Update All" with their NuGet packages and suddenly all their HTML controls are broken 😰

Thanks!

goodsky commented 3 years ago

Thanks for the feedback. The first commit was attempting to be non-breaking by setting all possible formats as the default for the Formats parameter. But I can see how that could cause strange behavior if quill changes their values.

I pushed a new change which wires through a null value if the Formats parameter is not supplied. What do you think?

ADefWebserver commented 3 years ago

Ok this looks good. I wont be able to test this until next weekend so please give me a week or so. Thank You!