mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-13 17:10:06 +00:00
exit formatting with escape
This commit is contained in:
parent
f0df5f4ac8
commit
a9b8f6f4d5
src/app/components/editor
|
@ -285,7 +285,9 @@ export function Toolbar() {
|
||||||
<Line variant="SurfaceVariant" direction="Vertical" style={{ height: toRem(12) }} />
|
<Line variant="SurfaceVariant" direction="Vertical" style={{ height: toRem(12) }} />
|
||||||
<Box shrink="No" gap="100">
|
<Box shrink="No" gap="100">
|
||||||
<ExitFormatting
|
<ExitFormatting
|
||||||
tooltip={<BtnTooltip text="Exit Formatting" shortCode={`${modKey} + E`} />}
|
tooltip={
|
||||||
|
<BtnTooltip text="Exit Formatting" shortCode={`Escape, ${modKey} + E`} />
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</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)) {
|
if (isAnyMarkActive(editor)) {
|
||||||
removeAllMark(editor);
|
removeAllMark(editor);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue