1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 13:51:59 +02:00

Do not try to disable Grammarly in Slate (#4650)

* Do not try to disable Grammarly in Slate

As the `data-gramm` attribute is no longer working actually. See #4124 

The Grammarly extension is not causing the DOM issues anymore, as they have reworked their highlighting logic: 
https://www.grammarly.com/blog/engineering/making-grammarly-feel-native-on-every-website/

* Add changeset
This commit is contained in:
Ivan Voskoboinyk 2021-11-10 01:52:31 +02:00 committed by GitHub
parent 9874ed704f
commit b6643132f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
'slate-react': patch
---
Do not disable Grammarly extension in Slate editors

View File

@ -567,10 +567,6 @@ export const Editable = (props: EditableProps) => {
<ReadOnlyContext.Provider value={readOnly}>
<DecorateContext.Provider value={decorate}>
<Component
// COMPAT: The Grammarly Chrome extension works by changing the DOM
// out from under `contenteditable` elements, which leads to weird
// behaviors so we have to disable it like editor. (2017/04/24)
data-gramm={false}
role={readOnly ? undefined : 'textbox'}
{...attributes}
// COMPAT: Certain browsers don't support the `beforeinput` event, so we'd