Editing a field creates a new object with Grammarly
See original GitHub issueWhen editing an existing field, a new value object is created. A simple fix to this is to make minor changes to the index.js file. At line 454
, replace
let jsonField = json.embed.fields[Array.from(fields.children).indexOf(field)];
with
let jsonField = json.embed.fields[Array.from(fields.children).indexOf(field)-2];
Source: Invalid array index
Edit:
-2
isn’t a permanent / efficient fix, the extension was messing up with the textarea
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Introducing the Text Editor SDK - Grammarly Support
The SDK lets you easily add and configure the Grammarly Text Editor Plugin. In text fields and editors that use the plugin, your...
Read more >Inline editing of text area fields with Grammarly - DataTables
Hi I noticed that if using Grammarly with an inline editor using a textarea based plugin, choosing a spelling or grammar correction using ......
Read more >Use Grammarly with Overleaf - Overleaf, Online LaTeX Editor
If you see only a two-way toggle or if you choose Source (legacy), it's the previous Ace-based editor which is incompatible with the...
Read more >How to add Grammarly to Google Docs - EditorNinja
Grammarly is the leader in grammar editing software and works amazingly in ... Log into your Grammarly account or create a new account....
Read more >Conflict with Grammarly chrome extension · Issue #616 - GitHub
@blacktaxi I am creating a new contentEditable editor. ... We've released support for Draft.js fields in Grammarly for Chrome for all users.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have just made a new commit 33a798cc44062611ddf1d7f6cf2ee0cc3e3cb68d which allows it to work with the extension. Grammarly adds a new element named
grammarly-extension
, All I had to do is to filter out only the elements with the class ‘field’ which all field elements should have by replacing this line.with this.
Alternatively, it should work if I only filtered divs, since Grammarly elements are named
grammarly-extension
.I cannot seem to replicate this problem. Works fine when I edit an existing field. In fact, removing 2 from an element’s index doesn’t work properly (and probably shouldn’t), it results to the first two fields getting ignored and not changed on the embed when edited since you are removing 2 from the index.
Which is why it’s confusing how you got to this problem in the first place, unless you edited the script before and might have changed something that caused this on your end. If not, what are the steps to get to this problem?