-
Notifications
You must be signed in to change notification settings - Fork 2
Configurable tiptap toolbar #484
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
Open
ornsteinfilip
wants to merge
19
commits into
v7
Choose a base branch
from
v7-icons
base: v7
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… with more lucide-react icons"" This reverts commit dcee77c.
…roups - Add window.Folio.Tiptap.customIcons for project-defined icons - Add window.Folio.Tiptap.toolbarGroups for project-defined dropdown groups - Add dropdown_group support in tiptap_config.toolbar - Create FolioEditorToolbarNodeGroups component for grouped nodes - Keep built-in ICON_MAP as fallback for common icons - Projects can define their own icons and groups without modifying Folio
- Add toolbar_groups attr to Folio::Tiptap::Config - Pass toolbar_groups through to_input_json to TipTap - Support both config-based and window-based toolbar groups - Allow projects to define dropdown groups from Rails initializer
Member
Author
|
@mreq Vybavil jsem na zkoušku tiptap skupinami ikonek. Přijde mi to pěkné a přehledné pro více tipů karet. Ještě to trochu rozvinu na našem webu v této samostatné branch.
|
- Add NODE_ICONS map to makeFolioTiptapNodesCommandGroup - Support toolbar_groups configuration for grouped slash commands - Each dropdown_group becomes a separate section in the popup - Individual nodes show their configured icons instead of default cube
- Introduce support for custom icons from the lucide-react set for each node - Allow organization of nodes into dropdown groups to streamline the toolbar - Provide detailed configuration examples for setting up toolbar groups and icons in Rails - Maintain backwards compatibility with existing toolbar functionality
Member
|
to vypada smysluplne 👍 na kod zatim nekoukam cc @hoxgen |
Contributor
|
super! |
…t delay support - Refactor redis_client method to build Redis options dynamically - Introduce redis_client_supports_reconnect_delay? method to check compatibility with reconnect_delay parameters - Ensure backward compatibility with redis-client versions by conditionally adding reconnect_delay options
* fix(embed): add instagram blockquote styles so iframe can load with the proper width * chore(changelog): add entry
…486) * fix(modals): only close parent modal when present * feat(modals): unify xl modals to 1172px * fix(files): don't validate file placements marked for destruction * fix(has_attachments): respect in-memory placements during validation - Filter out marked_for_destruction placements in validation - Use in-memory associations instead of DB queries in get_files_with_usage_constraints Fixes bug where replacing cover via nested attributes would validate old persisted file instead of new in-memory file.
… edit and new pages" This reverts commit 74594d5.
…endering Remove manual createTweet() calls after widgets.load() completes. Twitter's widgets.load() automatically processes all .twitter-tweet elements, so manual rendering was causing tweets to render twice. Let widgets.load() handle all tweet rendering automatically.
* added MOV mime type + fxed env sample * updated changelog * feat(videos): add MOV/QuickTime video support - Add video/quicktime MIME type registration - Update uppy component to allow .mov file extension for video/quicktime uploads - Update uppy component to display MOV instead of QUICKTIME in supported formats - Update player component to map video/quicktime to video/mp4 for browser compatibility --------- Co-authored-by: Petr Mlčoch <foton@centrum.cz>
…delines - Add root AGENTS.md with code formatting, linting, Rails best practices, and View Components guidelines - Add AGENTS.md template generator for Rails apps using Folio - Update docs/components.md with BEM class name construction details - Update tiptap/AGENTS.md with Code Formatting and Linting section
…pages (#490) * fix(tiptap): make commands support editor.can() checks Fix moveFolioTiptapPageUp/Down and other commands to properly support editor.can() checks by removing early returns when dispatch is undefined. When TipTap calls editor.can(), it passes dispatch=undefined to check if a command can execute. The previous implementation returned false immediately in this case, preventing proper validation. Changes: - Remove early 'if (!dispatch) return false' checks from command wrappers - Make dispatch optional in utility functions (moveFolioTiptapPage, addOrDeletePage, moveFolioTiptapNode, addOrDeleteColumn, cancelFolioTiptapFloat) - Validate conditions first, then only perform operations if dispatch is provided - Fix TypeScript namespace from 'pages' to 'folioTiptapPages' to match node name This fixes the inactive arrow buttons in folioTiptapPage bubble menus. * feat(tiptap): remove trailing empty paragraphs from all block elements recursively - Extend removeTrailingEmptyParagraph to recursively process nested block elements - Remove trailing empty paragraphs from float aside, columns, styled wrap, pages, etc. - Only remove trailing empty paragraphs if they follow other content - Keep single empty paragraph if it's the only item - Refactor to use early returns for better readability * docs(tiptap): add early returns preference to AGENTS.md * feat(tiptap): refactor paragraph placeholder to use wrapper component with FloatingPortal - Create HasParagraphPlaceholder wrapper component to handle placeholder logic - Use FloatingPortal to escape stacking context issues - Add editor update listener to show placeholder when content changes (only when hovering) - Update all node views (page, column, float-aside, float-main, styled-wrap) to use new wrapper - Add default #ffffff fallback to f-tiptap-root__background-color CSS variable - Update placeholder styles: smaller font, Plus icon, centered layout, bottom padding * chore(deps): update tiptap packages to v3.11.1 and floating-ui packages - Update all @tiptap/* packages from 3.0.1/3.0.7 to 3.11.1 - Update @floating-ui/dom from 1.7.2 to 1.7.4 - Update @floating-ui/react from 0.27.12 to 0.27.16 Key improvements: - Added native RTL/bidirectional text direction support in Tiptap - Improved TypeScript generics for Node.extend - Fixed TrailingNode extension bug - Fixed getViewportRect to account for scrollbar-gutter - Added ShadowRoot container support in FloatingPortal * fix(tiptap): improve placeholder styles in float layouts - Apply two-line placeholder with webkit line-clamp when float aside is narrow (max-width: 250px), using the aside's container context - Offset placeholder in float main to account for aside width and position using CSS custom properties - Cap placeholder width when aside is on the right to prevent overlap * guard(forms): ensure consistent rendering of form partials in edit and new pages * fix(embed): instagram embed from url width (#485) * fix(embed): add instagram blockquote styles so iframe can load with the proper width * chore(changelog): add entry * fix(has_attachments): respect in-memory placements during validation (#486) * fix(modals): only close parent modal when present * feat(modals): unify xl modals to 1172px * fix(files): don't validate file placements marked for destruction * fix(has_attachments): respect in-memory placements during validation - Filter out marked_for_destruction placements in validation - Use in-memory associations instead of DB queries in get_files_with_usage_constraints Fixes bug where replacing cover via nested attributes would validate old persisted file instead of new in-memory file. * chore(tiptap): build * Revert "guard(forms): ensure consistent rendering of form partials in edit and new pages" This reverts commit 74594d5. * fix(tiptap): improve placeholder styles in float layouts - Always use two-line placeholder for empty paragraphs that are only child of [data-node-view-content-react] in float aside/main - Add webkit clamp styles for float main placeholder - Apply placeholder offset/limit in float main only to first child paragraphs - Remove media query by setting default CSS custom property values (0) so calc() evaluates correctly at all breakpoints * chore(tiptap): build * fix(embed): remove manual Twitter tweet rendering to prevent double rendering Remove manual createTweet() calls after widgets.load() completes. Twitter's widgets.load() automatically processes all .twitter-tweet elements, so manual rendering was causing tweets to render twice. Let widgets.load() handle all tweet rendering automatically. * feat(files): improve MOV videos support (#487) * added MOV mime type + fxed env sample * updated changelog * feat(videos): add MOV/QuickTime video support - Add video/quicktime MIME type registration - Update uppy component to allow .mov file extension for video/quicktime uploads - Update uppy component to display MOV instead of QUICKTIME in supported formats - Update player component to map video/quicktime to video/mp4 for browser compatibility --------- Co-authored-by: Petr Mlčoch <foton@centrum.cz> * docs: add AGENTS.md with Rails best practices and View Components guidelines - Add root AGENTS.md with code formatting, linting, Rails best practices, and View Components guidelines - Add AGENTS.md template generator for Rails apps using Folio - Update docs/components.md with BEM class name construction details - Update tiptap/AGENTS.md with Code Formatting and Linting section * docs: update AGENTS.md template * docs(agents): update commit examples with real project commits --------- Co-authored-by: Filip Ornstein <filip@sinfin.cz> Co-authored-by: Vláďa <34059901+VladaTrefil@users.noreply.github.com> Co-authored-by: Petr Mlčoch <foton@centrum.cz>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


No description provided.