-
-
Notifications
You must be signed in to change notification settings - Fork 254
Add support for Quill modules in BitRichTextEditor (#11435) #11449
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
Add support for Quill modules in BitRichTextEditor (#11435) #11449
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAdds support for custom Quill modules to BitRichTextEditor. Updates C#, JS interop, and TypeScript setup to accept module metadata and configs, load module scripts at first render, signal module readiness, and pass modules to Quill. Demo updated to showcase image resizing via a new quill-image-resize-module script. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User/Page
participant R as BitRichTextEditor (.razor.cs)
participant JS as IJSRuntime
participant TS as BitRichTextEditor.ts
participant Q as Quill
U->>R: Render component (firstRender)
R->>JS: Load base Quill script
JS-->>R: Loaded
R-->>U: OnQuillReady
alt Modules provided
loop For each module
R->>JS: Load module script (Src)
JS-->>R: Loaded (errors ignored)
end
R-->>U: OnQuillModulesReady
end
R->>TS: RichTextEditor.setup(..., quillModules)
TS->>Q: new Quill(editor, { modules: { toolbar, ...quillModules }})
Q-->>TS: Ready
TS-->>R: Editor created
R-->>U: OnEditorReady(id)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (8)
src/BlazorUI/Bit.BlazorUI.Extras/Components/RichTextEditor/BitRichTextEditor.razor.cs(4 hunks)src/BlazorUI/Bit.BlazorUI.Extras/Components/RichTextEditor/BitRichTextEditor.ts(2 hunks)src/BlazorUI/Bit.BlazorUI.Extras/Components/RichTextEditor/BitRichTextEditorJsRuntimeExtensions.cs(1 hunks)src/BlazorUI/Bit.BlazorUI.Extras/Components/RichTextEditor/BitRichTextEditorModule.cs(1 hunks)src/BlazorUI/Bit.BlazorUI.Extras/Components/RichTextEditor/QuillModule.cs(1 hunks)src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/RichTextEditor/BitRichTextEditorDemo.razor(1 hunks)src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/RichTextEditor/BitRichTextEditorDemo.razor.cs(7 hunks)src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/wwwroot/scripts/quill-image-resize-module.js(1 hunks)
🧰 Additional context used
🪛 Biome (2.1.2)
src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/wwwroot/scripts/quill-image-resize-module.js
[error] 1-1: Comparing to itself is potentially pointless.
(lint/suspicious/noSelfCompare)
[error] 1-1: Comparing to itself is potentially pointless.
(lint/suspicious/noSelfCompare)
[error] 1-1: eval() exposes to security risks and performance issues.
See the MDN web docs for more details.
Refactor the code so that it doesn't need to call eval().
(lint/security/noGlobalEval)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build and test



closes #11435
Summary by CodeRabbit
New Features
Refactor
Documentation