mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-01-29 01:28:29 +00:00
exit formatting with escape
This commit is contained in:
parent
f0df5f4ac8
commit
a9b8f6f4d5
|
@ -285,7 +285,9 @@ export function Toolbar() {
|
|||
<Line variant="SurfaceVariant" direction="Vertical" style={{ height: toRem(12) }} />
|
||||
<Box shrink="No" gap="100">
|
||||
<ExitFormatting
|
||||
tooltip={<BtnTooltip text="Exit Formatting" shortCode={`${modKey} + E`} />}
|
||||
tooltip={
|
||||
<BtnTooltip text="Exit Formatting" shortCode={`Escape, ${modKey} + E`} />
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
</>
|
||||
|
|
|
@ -55,7 +55,7 @@ export const toggleKeyboardShortcut = (editor: Editor, event: KeyboardEvent<Elem
|
|||
}
|
||||
}
|
||||
|
||||
if (isKeyHotkey('mod+e', event)) {
|
||||
if (isKeyHotkey('mod+e', event) || isKeyHotkey('escape', event)) {
|
||||
if (isAnyMarkActive(editor)) {
|
||||
removeAllMark(editor);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue