mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 02:00:28 +03:00
Add ESC btn to toolbar to quickly exit formatting (#1283)
* Add ESC btn to toolbar to quickly exit formatting * add horizontal scroll to toolbar item * make editor toolbar usable in touch device * fix editor hotkeys not working in window * remove unused import
This commit is contained in:
parent
2883b4c35b
commit
bc5e7445d9
7 changed files with 210 additions and 108 deletions
|
|
@ -32,7 +32,9 @@ export const toggleMark = (editor: Editor, format: MarkType) => {
|
|||
};
|
||||
|
||||
export const removeAllMark = (editor: Editor) => {
|
||||
ALL_MARK_TYPE.forEach((mark) => Editor.removeMark(editor, mark));
|
||||
ALL_MARK_TYPE.forEach((mark) => {
|
||||
if (isMarkActive(editor, mark)) Editor.removeMark(editor, mark);
|
||||
});
|
||||
};
|
||||
|
||||
export const isBlockActive = (editor: Editor, format: BlockType) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue