toggleBoldCommand top-level property
Markdown key event.
Cmd / Ctrl + B: toggle bold Cmd / Ctrl + I: toggle italic Cmd / Ctrl + U: toggle underline Cmd / Ctrl + Shift + S: toggle strikethrough Cmd / Ctrl + E: code
- support
- desktop
- web
Implementation
final CommandShortcutEvent toggleBoldCommand = CommandShortcutEvent(
key: 'toggle bold',
getDescription: () => AppFlowyEditorL10n.current.cmdToggleBold,
command: 'ctrl+b',
macOSCommand: 'cmd+b',
handler: (editorState) => _toggleAttribute(
editorState,
AppFlowyRichTextKeys.bold,
),
);