The Syntax: What’s New in Grammarly for Builders | Grammarly
[ad_1]
OMG, y’all, it’s June! 4 months have flown by since I posted the final version of The Syntax, and I’m excited to share with you the options and fixes our engineering staff has applied since then. Here’s what I’ll cowl on this publish:
Efficiency enhancements for long-form textual content 📈
Video overview
Final week I hosted a reside stream the place members of the Grammarly for Builders staff joined me to indicate off the most recent options and fixes. A recording of the stream is accessible under:
https://www.youtube.com/watch?v=yhetTsghAeg
Dictionaries 📖
TL;DR: You may create an app dictionary so Grammarly will acknowledge the phrases and jargon that your customers ceaselessly write.
Grammarly acknowledges all kinds of phrases, however we’ve heard from a lot of you that your customers embody industry-specific jargon and phrases of their textual content. When Grammarly doesn’t acknowledge the jargon and phrases, Grammarly flags them as being misspelled.
In case your app is on the Plus plan, you’ll be able to create app dictionaries and configure which of your textual content editors use them starting in model 2.5.0. For instance, you may need to configure some textual content editors to make use of authorized and medical dictionaries whilst you may need to configure others to make use of a dictionary of tech jargon.
I constructed a dictionary of phrases from the TV present Parks and Recreation as a result of, in my view, it’s one of the best present ever created. And that may be a reality. 😉
On the Dictionaries web page within the App Console, you’ll be able to add phrases to a dictionary individually, or you’ll be able to add a CSV file containing a line-separated listing of phrases. When you’ve added phrases to a dictionary and configured your textual content editor to make use of it, Grammarly will now not flag the phrases within the dictionary as being misspelled.
Aspect word for these of you who’re questioning how this performance differs from the private dictionary I described within the February version of The Syntax:
- Particular person customers of your app can add phrases to their very own private dictionaries. Solely they’ve entry to that dictionary.
- App homeowners and collaborators can create app dictionaries. After you have configured a textual content editor to make use of an app dictionary, Grammarly will use the app dictionary for any person who writes textual content in that editor.
Should you create a dictionary that others could discover useful, I encourage you to add the CSV file to GitHub or one other location of your selection and share the hyperlink in this dialogue thread within the Grammarly for Builders GitHub repo. To get the enjoyable began, I’ve created a dictionary for phrases from the TV present Parks and Recreation and shared it in the thread.
Emoji autocomplete 😲
TL;DR: Your customers can insert emojis by typing a colon adopted by a letter.
I like emojis, and chances are high good that a lot of your customers do as properly. We’ve made it simpler in your customers so as to add emojis to their textual content by implementing emoji autocomplete in model 2.4.0 of the SDK.
In case your app is on the Plus plan, you’ll be able to activate emoji autocomplete utilizing the autocomplete config possibility. You may select between 4 attainable values for autocomplete:
on
: Textual content phrase autocomplete and emoji autocompletetextual content
: Solely textual content phrase autocompleteemoji
: Solely emoji autocompleteoff
: No autocomplete of any type. That is the default possibility.
When emoji autocomplete is turned on, your customers will be capable to add an emoji by typing a colon adopted by a letter.
suggestion-card-action ➡️
TL;DR: Your app can pay attention for the suggestion-card-action occasion to know when a person has accepted a suggestion, dismissed a suggestion, or closed an open suggestion card.
We all know that a lot of you might want to programmatically take an motion when your customers work together with the Grammarly Textual content Editor Plugin. We obtained a request for the plugin to emit an occasion every time a person interacts with an open suggestion card, so we created the suggestion-card-action occasion in model 2.3.14.
The suggestion-card-action
occasion is emitted every time a person interacts with an open suggestion card by accepting a suggestion, dismissing a suggestion, or closing the cardboard.
For instance, in JavaScript you’ll be able to add an occasion listener to your editor:
Then you’ll be able to create a operate to deal with the occasion. The instance operate under solely logs the occasion, however your operate may do one thing extra helpful with the occasion information.
The suggestion-card-action occasion consists of plenty of data. You’ll doubtless be most within the sort and element properties.
The Textual content Editor Plugin exposes a number of customized occasions, together with document-stats (which supplies data just like the readability rating, phrase rely, and studying time) and session-stats (which supplies data just like the variety of accepted ideas and the variety of phrases analyzed throughout the present session). Study extra about the entire occasions on the brand new Customized Occasions web page within the docs. You may also discover the occasions in this instance hosted on CodeSandbox.
Efficiency enhancements for long-form textual content 📈
TL;DR: We mounted efficiency points for long-form textual content.
We made efficiency enhancements for editors containing massive quantities of textual content (textual content >1500 phrases) in model 2.3.15. (An enormous shout out to Gnohz Gniy for reporting the efficiency problem!) Be looking out for an upcoming publish on the Grammarly for Builders weblog the place we’ll present a behind-the-scenes take a look at how we optimize SDK efficiency.
Should you encounter any efficiency points after upgrading to model 2.3.15 or later, please report a problem within the Grammarly for Builders GitHub repo.
Wrapping up
Our staff has delivered enjoyable and helpful options and fixes over the previous few months:
- You may create an app dictionary in order that Grammarly gained’t flag phrases which are widespread in your app as misspelled phrases.
- Your customers can insert emojis by typing a colon adopted by a letter.
- Your app can programmatically take an motion every time a person accepts a suggestion, dismisses a suggestion, or closes an open suggestion card by listening for the suggestion-card-action occasion.
- You’ll discover a efficiency enchancment when utilizing the SDK with long-form textual content.
For an in depth listing of what was included in every launch, take a look at the changelog.
As at all times, we’d love to listen to from you! You probably have any questions or ideas for enchancment, please begin a dialogue within the Grammarly for Builders GitHub repo. I stay up for chatting with you there!
[ad_2]