feat: add clear formatting button to toolbar - #9046
Open
ibrahim-iqbal wants to merge 1 commit into
Open
ibrahim-iqbal wants to merge 1 commit into
ibrahim-iqbal wants to merge 1 commit into
Conversation
Adds a "Clear formatting" entry to the desktop toolbar's "More options" popover. It strips bold, italic, underline, strikethrough, code, font family, link, background color, and text color from the selected text using editorState.formatDelta with null attributes. Closes AppFlowy-IO#3427
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR introduces an always-visible Clear formatting action in the desktop More options popover, using the existing eraser icon and localized label. When invoked, it applies a null-valued format delta across the selected range to remove the supported inline formatting attributes in one operation. Sequence diagram for clearing selected text formattingsequenceDiagram
actor User
participant MoreOptionsPopover
participant EditorState
User->>MoreOptionsPopover: Select Clear formatting
MoreOptionsPopover->>EditorState: formatDelta(selection, null-valued format attributes)
EditorState-->>User: Selected text has inline formatting removed
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🥷 Ninja i18n – 🛎️ Translations need to be updatedProject
|
| lint rule | new reports | level | link |
|---|---|---|---|
| Missing translation | 29 | warning | contribute (via Fink 🐦) |
| Identical pattern | 1 | warning | contribute (via Fink 🐦) |
This branch has not been deployed
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
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.
Feature Preview
Adds a Clear formatting button to the desktop toolbar's "More options" (⋯) popover menu. Selecting text and clicking it strips all inline formatting (bold, italic, underline, strikethrough, code, font family, link, background color, and text color) in one click.
The button uses the existing
erasericon and appears below the formula entry in the popover, always visible when the more-options menu is open.fixes #3427
PR Checklist
Summary by Sourcery
Add a clear-formatting control to the editor toolbar for quickly removing formatting from selected text.
New Features:
Chores: