Skip to content

Conversation

@benmerckx
Copy link
Member

This is a first step in making the rich text field fully configurable. It allows users to edit the toolbar buttons and menus. It's possible to add, remove or re-arrange the toolbar.

@benmerckx benmerckx force-pushed the feat/richtext-toolbar-view branch from ed9a0f6 to cdb49f5 Compare December 11, 2025 09:39
@benmerckx benmerckx requested a review from Copilot December 11, 2025 09:40
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/alineacms/alinea@465

commit: 4189e89

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces configurable toolbar functionality for rich text fields, allowing users to customize toolbar buttons and menus through a new toolbar configuration option. The implementation separates toolbar definitions from the component implementation, making the rich text field more flexible and maintainable.

  • Extracted toolbar configuration into a separate module with reusable toolbar items
  • Refactored RichTextToolbar component to render toolbar dynamically based on configuration
  • Added support for custom toolbar layouts through the toolbar option in rich text field configuration

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/field/richtext/Toolbar.tsx New file defining reusable toolbar items (headings, formatting, tables, etc.) and the default toolbar configuration
src/field/richtext/RichTextToolbar.tsx Refactored to render toolbar dynamically based on configuration instead of hardcoded UI elements
src/field/richtext/RichTextField.view.tsx Updated to pass toolbar configuration to RichTextToolbar component and adjust focus detection logic
src/field/richtext/RichTextField.ts Added toolbar configuration option to RichTextOptions interface
src/dashboard/view/IconButton.tsx Modified to accept ReactNode in addition to ComponentType for the icon prop
src/core/field/RichTextField.ts Updated to handle referencedViews from toolbar configuration
apps/dev/src/schema/example/RichTextFields.tsx Added example demonstrating custom toolbar configuration with modified table insertion

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@benmerckx benmerckx requested a review from Copilot December 11, 2025 10:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants