-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prop to optionally enable grammarly #2855
Add prop to optionally enable grammarly #2855
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the PR @nadeemshaik. I don't think we should have a prop specific to a third party service. Maybe there's a solution that allows passing of generic data attributes to the DOM node? |
Makes sense @brendancarney. There doesn't seem to be existing support for data/dom attributes, but I can see that data attributes are being used locally here Maybe extend this through props? |
My opinion is that any prop passed to
and it would work. This one is probably @ianstormtaylor's call though, so let's see what he thinks. |
Passthrough for all seems reasonable to me! I agree that it would be good to find a solution that doesn't special-case one prop over others. |
969e6c0
to
bf7f2dc
Compare
@ianstormtaylor @brendancarney how does this look, couldn't think of a better way to omit the editor/content props. Any ideas? |
bf7f2dc
to
1742a1d
Compare
1742a1d
to
258d1d5
Compare
Hey @ianstormtaylor, did you get a chance to take a look at this? |
Thanks @nadeemshaik! |
Hi @nadeemshaik + @ianstormtaylor! Do you happen to know what slate release included this change? I searched through some recent releases but still see |
Hey @Jacfem , I am sure it is present in version 0.44.9. It might have been published just a little earlier than that. The idea was always to just have the ability to pass any attributes/props from the implementation level and have it override the props of the editor. |
Is this adding or improving a feature or fixing a bug?
Feature(i guess): This enables the user to optionally pass a prop to enable Grammarly which was previously disabled in #733.
What's the new behavior?
You can also check it here sandbox. You will, of course, need to install the Grammarly extension. The above demo was tested on version 14.915.2321
How does this change work?
Since Grammarly has moved to an API based content modification, it would be really helpful for users to be able to enable Grammarly if it suits them. So I have added a prop to enable the same. The only non-trivial part is that the extension doesn't seem to work as long as the prop
data-gramm
exists irrespective of its value.Have you checked that...?
yarn test
.yarn lint
. (Fix errors withyarn prettier
.)yarn watch
.)Does this fix any issues or need any specific reviewers?
Fixes: #733
Reviewers: