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:
Ajay Bura 2023-06-16 11:09:09 +10:00 committed by GitHub
commit bc5e7445d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 208 additions and 106 deletions

View file

@ -104,7 +104,13 @@ export const CustomEditor = forwardRef<HTMLDivElement, CustomEditorProps>(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { style, ...props } = attributes;
return (
<Text as="span" {...props} className={css.EditorPlaceholder} contentEditable={false}>
<Text
as="span"
{...props}
className={css.EditorPlaceholder}
contentEditable={false}
truncate
>
{children}
</Text>
);