implement spell checker for whole document

Currently I am applying spell checker for my document editor as follows:
    this.serviceLink = this.baseUrl + '/api/syncfusion/';
    this.documentContainer.documentEditor.spellChecker.languageID = 2057//LCID of "en-GB";
    this.documentContainer.documentEditor.spellChecker.removeUnderline = false;
    this.documentContainer.documentEditor.spellChecker.allowSpellCheckAndSuggestion = true;
    this.documentContainer.documentEditor.spellChecker.enableOptimizedSpellCheck = true;

This works great but a call is made to the server to check spelling after every (I think) space is detected.
This creates a heavy call load on the api.
What I would like to do is have a button on the toolbar to spell check the entire document and have the option to toggle red-squiggle-underlining.
How can I do this?



9 Replies 1 reply marked as answer

HC Harini Chellappa Syncfusion Team July 27, 2020 12:15 PM UTC

Hi Bob, 

Currently we are checking on this. Will update further details by July 29th, 2020. 

Regards, 

Harini C 



HC Harini Chellappa Syncfusion Team July 29, 2020 04:24 PM UTC

Hi Bob, 

Syncfusion Greetings! 

Document editor provides option to enable/disable the spellcheck and to toggle the render underline in status bar. 

 

Document provides API to toggle the red underline and spellcheck. 

containerInstance.documentEditor.spellChecker.removeUnderline
containerInstance.documentEditor.spellChecker.enableSpellCheck 
 
But UI is not refreshed when setting the above API. We have logged a bug task for this. Fix will be included in our upcoming EJ2 patch release which is tentatively scheduled on Aug 12th, 2020. Once included, will update you. Fix status can be tracked from below link. 


Regards, 

Harini C 



BI bob ingham July 30, 2020 08:11 AM UTC

Hi Harini,

I found the spell check drop down, thanks.
However, the problem is not the availability of this functionality but the load on the server when spell check is enabled.
If I have hundreds of users editing documents at the same time the idea of calling a spell check for every word as it is typed is simply too great.
Is there any way the drop down could be used to fire off a single spell check operation for all content in the document?

Cheers,
Bob




AE Ajithamarlin Edward Syncfusion Team July 31, 2020 02:14 PM UTC

Hi Bob,  
 
Regarding Is there any way the drop down could be used to fire off a single spell check operation for all content in the document? 
 
We don’t have support to fire off a single spell check operation for all content in the document 
 
But, We do have support to fire off a single spell check operation per page. You can achieve this by using enableOptimizedSpellCheck API. 
 
 
Alternatively, You can enable/disable the spell check feature to trigger spell check for all the content in the document 
 
Regards, 
Ajithamarlin E. 



DI developer innovapps May 5, 2021 02:50 PM UTC

Hello I have enabledOtimizedSpellcheck functionality enabled, but it is not working, additionally, the spelling drop-down menu does not allow me to enable or disable the function, it is always enabled.

As it stands, it continues to send many requests to time. Am I missing any settings?




SM Suriya Murugan Syncfusion Team May 6, 2021 10:02 AM UTC

Hi, 

enableOptimizedSpellCheck allows to spell check page by page when document loading. We suspect the issue that your languageId is not matched with server side languageId. Can you please check it to work spell check functionality? 

To optimize spell check request, we have already logged the feature request to request spell check based on time interval. We will include it in any of our upcoming release. 

You can track the status of this feature through below feedback link: 

Regards, 
Suriya M. 



DI developer innovapps May 6, 2021 01:28 PM UTC

the general correction works, what is not working is SpeelcheckByPage. It is enabled from the code.




KB Kurthis Banu Abdul Majeeth Syncfusion Team May 7, 2021 11:44 AM UTC

Hi Bob, 

In our end spellcheckByPage has been trigger properly when “enableOptimizedSpellCheck” set to true. But spellcheck (spellcheck by word) also trigger each time for every single word when loading document. Currently, we are validating this behaviour. We will update further details by May 11,2021. 

Regards, 
Kurthis Banu A. 



KB Kurthis Banu Abdul Majeeth Syncfusion Team May 11, 2021 10:27 AM UTC

Hi Bob,    

Sorry for the inconvenience caused. We are not able reproduce the reported issue. 

Please find the behaviour of the spell check: 

1. When "enableOptimizedSpellCheck" is set to true it will call the page-by-page spell check when a document is opened.
2. When we type a word after opening a document spell check for each word only be triggered. 

We are prepared sample based on your requirement kindly check the below sample link.  

Client side: 


Server side: 


Please find the code changes in DocumentEditorController.cs and Startup.cs files.  

Note:  please find the Dictionary files in the name of Data. 

Please let us know if you have any questions.  

Regards,  
Kurthis Banu A.  


Marked as answer
Loader.
Up arrow icon