Spell Check crashes the network

Hello,

So, I'm using the spell check inside of the doucment editor and even though I enabled the OptimizedSpellCheck, with certain documents, it just makes so many requests which causes the editor to frozen till all requests finish. here's the code I'm using:

 let documentEditor = this.$refs.documenteditor.ej2Instances.documentEditor;
documentEditor.spellChecker.languageID = 2057;
documentEditor.spellChecker.enableSpellCheck = false;
documentEditor.spellChecker.allowSpellCheckAndSuggestion = true;
documentEditor.spellChecker.enableOptimizedSpellCheck = true;


also, I want to use the en-GB file instead of en-US.

Thanks a lot

5 Replies 1 reply marked as answer

KB Kurthis Banu Abdul Majeeth Syncfusion Team February 17, 2021 08:37 AM UTC

Hi Omar, 

 
To enable spellcheck feature of document editor, we need to write a Web API for spellcheck in controller. please check the below        

 
 
### Where to find the dictionaries 
 


 
 In Document Editor component, you have to set as like below:        
 
 
//Run the web service  then replace the service URL by running local URL.  
 
 
 <ejs-documenteditor ref="documenteditor" id="container_1" style='height:600px;' :enableSpellCheck='true'></ejs-documenteditor> 
 
mounted: function() { 
        this.$refs. documenteditor.ej2Instances.serviceUrl = this.hostUrl + 'api/documenteditor/'; 
        this.$refs.documenteditor.ej2Instances.spellChecker.languageID = 1033; //LCID of "en-us" 
        this.$refs.documenteditor.ej2Instances.spellChecker.removeUnderline = false; 
        this.$refs.documenteditor.ej2Instances.spellChecker.allowSpellCheckAndSuggestion = true; 
    } 
 



 
Documentation Link: 
 
 


 
Please let us know if you have any questions.  


 
Regards,  
 
Kurthis Banu A.  
 



OM Omar February 17, 2021 09:44 AM UTC

I done exactly same as that, but still have so many requests being made by the client.


KB Kurthis Banu Abdul Majeeth Syncfusion Team February 18, 2021 09:44 AM UTC

Hi Omar, 

Regarding: still have so many requests being made by the client. 

We have already logged feature request to optimize the spell check request to server based on specific time interval. Request will send to server after provided time interval.  

We will include it in our 2021 volume 2 release which is tentatively scheduled on end of June 2021. We will update you once feature implemented. You can track the status of feature through below feedback link:    
    

Regarding: EnableOptimizedSpellCheck 

Document editor provides option to spellcheck by page when loading the documents. 
i.e. when loading the documents, spellcheck API will be called for each word in the document, if enableOptimizedSpellCheck property of spellcheck module is not set to true. 

Sample code snippet: 
Document editor container 
ContainerInstance.documentEditor.spellChecker. enableOptimizedSpellCheck = true; 
 

Document editor 
documentEditorInstance.spellChecker. enableOptimizedSpellCheck = true; 
 

When typing characters, if we press space, then spellcheck API will be called to spellcheck the current typed word. 
Please let us know the provided details satisfies your requirement.  

Regards, 
Kurthis Banu A. 



OM Omar February 24, 2021 12:23 PM UTC

Hi Kurthis,

I've done exactly the same but it still fires too many requests if the file has a lot of text.

My point is:
1. If I'm not typing, I want to fire spell-check for the whole page at once.
2. If I'm typing, then spell check normally after the space gets pressed.

Thanks


KB Kurthis Banu Abdul Majeeth Syncfusion Team February 25, 2021 06:02 AM UTC

Hi Omar,  

Regarding: still have so many requests being made by the client.  

We have already logged feature request to optimize the spell check request to server based on specific time interval. Request will send to server after provided time interval.   

We will include it in our 2021 volume 2 release which is tentatively scheduled on end of June 2021. We will update you once feature implemented. You can track the status of feature through below feedback link:     
     

Regards, 
Kurthis Banu A

Marked as answer
Loader.
Up arrow icon