Spell checker

I am building a sample document editor example in single web page. I Keep getting following error

ej2.min.js:1 POST https://ej2services.syncfusion.com/production/web-services/api/documenteditor/importSpellCheck 404 (Not Found)

(anonymous) @ ej2.min.js:1
e.CallSpellChecker @ ej2.min.js:1
e.handleChangeDetectedElements @ ej2.min.js:1
e.renderTextElementBox @ ej2.min.js:1
e.renderLine @ ej2.min.js:1
e.renderParagraphWidget @ ej2.min.js:1
e.renderWidget @ ej2.min.js:1
e.render @ ej2.min.js:1
e.renderWidgets @ ej2.min.js:1
t.renderPage @ ej2.min.js:1
t.addVisiblePage @ ej2.min.js:1
t.updateVisiblePages @ ej2.min.js:1
t.updateScrollBars @ ej2.min.js:1
e.reLayout @ ej2.min.js:1
e.insertTextInternal @ ej2.min.js:1
e.insertText @ ej2.min.js:1
e.handleTextInput @ ej2.min.js:1
onKeyPressInternal @ ej2.min.js:1



-- Here is my sample code 


            var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({
                isReadOnly: false,
                enableSelection: true,
                enableEditorHistory: true,
                enableToolbar: true,
                enableSpellCheck: true,
                enableEditor: true,
                enableContextMenu: true,
                enableSfdtExport: true,
                enableFontDialog: true,
                enableParagraphDialog: true,
                enableTableDialog: true,
                enableBookmarkDialog: true,
                enableHyperlinkDialog: true,
                enableTableOfContentsDialog: true,
                enableStylesDialog: true,
                enableListDialog: true,
                enableTableOptionsDialog: true,
                enableTablePropertiesDialog: true,
                enableBordersAndShadingDialog: true,
                enablePrint: true,
                enableImageResizer: true,
                enableSearch: true,
                showPropertiesPane: false
            });
            ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar);
            documenteditorContainer.serviceUrl = 'https://ej2services.syncfusion.com/production/web-services/api/documenteditor/import';
            documenteditorContainer.appendTo('#container');
            documenteditorContainer.height = "1000px";
            let spellChecker = documenteditorContainer.documentEditor.spellChecker;
            spellChecker.languageID = 1033 //LCID of "en-us";
            spellChecker.removeUnderline = false;
            spellChecker.allowSpellCheckAndSuggestion = true;


Am I missing something .... Please help. 

-Sampurnima


2 Replies

KB Kurthis Banu Abdul Majeeth Syncfusion Team January 7, 2021 06:41 AM UTC

Hi Sampurnima kovi, 

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




 In Document Editor component, you have to set as like below        


var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ 
 
 enableToolbar: true,   enableSpellCheck: true }); 
 
  ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); 
 
// Run the web service  then replace the service URL by running local URL. 
 
documenteditorContainer.serviceUrl ="http://localhost:62870/api/documenteditor/"  
 
 documenteditorContainer.appendTo('#container'); 
 
 let spellChecker = documenteditorContainer.documentEditor.spellChecker; 
 
 spellChecker.languageID = 1033 //LCID of "en-us"; 
 
 spellChecker.removeUnderline = false; 
 
  spellChecker.allowSpellCheckAndSuggestion = true; 
 





Please let us know if you have any questions. 


Regards, 

Kurthis Banu A. 



      


       




KB Kurthis Banu Abdul Majeeth Syncfusion Team January 18, 2021 09:04 AM UTC

Hi Sampurnima, 
  
Please modify your  serviceUrl : 
  
// Run the web service then replace the service URL by running local URL.  
  
 Example : 
  
 
documenteditorContainer.serviceUrl ="http://localhost:62870/api/documenteditor/"   
 
 
  
Regards, 
  
Kurthis Banu A. 


Loader.
Up arrow icon