Skip to content

fix: state of bold formatting in inline toolbar #2938

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
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- `DX` - Tools submodules removed from the repository
- `Improvement` - Shift + Down/Up will allow to select next/previous line instead of Inline Toolbar flipping
- `Improvement` - The API `caret.setToBlock()` offset now works across the entire block content, not just the first or last node.
- `Fix` - Showing the correct state of bold formatting in the inline toolbar

### 2.30.7

Expand Down
5 changes: 2 additions & 3 deletions src/components/inline-tools/inline-tool-bold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ export default class BoldInlineTool implements InlineTool {
return {
icon: IconBold,
name: 'bold',
onActivate: () => {
document.execCommand(this.commandName);
},
toggle: true,
onActivate: () => document.execCommand(this.commandName),
isActive: () => document.queryCommandState(this.commandName),
};
}
Expand Down