Question
Bits in Glass
IN
Last activity: 23 Dec 2019 0:30 EST
Spell check option in Rich Text Editor
Hi,
I am having a requirement as, User can able to see Misspelled words while typing in Rich text editor and on selection of misspelled word suggestions would be display.
As per OOTB option, we need to click on Spell check option to perform this operations automatically. But in my scenario I need not to click on Spell check,all actions need to perform.
Can anyone help me on this requirement?
Thanks
Hemalatha
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hemalatha,
I can only think of configuring action - Any Key > Spell Check on your field that hosts the RTE control to do this.
But you must remember the Pega RTE is based on third party ckeditor, so if this does not suffice your needs then you are most likely looking at an enhancement to the editor before the same can be functional within Pega. Thanks.
Bits in Glass
IN
Hi Sunny,
I am looking for this requirement because this was requested by client. They are trying to avoid number of clicks. Why because we need to click on Spell check button every time we add new words to Rich text editor.Its not recommended so we are trying to overcome this issue.
Thanks
Hemalatha
Pegasystems Inc.
US
Hi Hemalatha,
Could you please try the following.
1.Create a non auto section and add the below script
<script type="text/javascript"> $(document).ready(function() { CKEDITOR.on( 'instanceReady', function( evt ) { var editor = evt.editor; editor.document.$.body.setAttribute('spellcheck',true); }); }); </script>
2.Include the non auto in the main section where you include the RTE.
For detailed instructions please go through the below article.
https://collaborate.pega.com/question/auto-spell-check-feature
Bits in Glass
IN
Hi
I already found this article and implemented as well.But it is working up to highlighting misspelled words not to display suggestions on click on it.Thank you for your suggestion.
Thanks
Hemalatha
Pegasystems Inc.
IN
Hi Hemalatha,
I have the same requirement at my end where I need to highlight and show suggestions as well. Could you please let us know what you have done for this.
Thanks
Bits in Glass
IN
Hi Muktj,
By default spellcheck will work for Text Area, Even for Rich text editor also we have two option.
- By default RichTextEditor control will give you SpellCheck Option.We can enable that in Rich Text Editor configuration.After entering text every time you need to click that option for spell check to perform.(Manual Spell check)
- If you want it to happen automatically, you need to do 2 operations.
- Create non-generated HTML section and include the code mentioned below.(for highlight misspelled words)
- Add the newly created section to your section and include SpellCheck action for onChange event on RTE. ( to display suggestions for misspelled words)
<script type="text/javascript"> $(document).ready(function() { CKEDITOR.on( 'instanceReady', function( evt ) { var editor = evt.editor; editor.document.$.body.setAttribute('spellcheck',true); }); }); </script>
This will helps you, if you find any difficulty please let me know.
Thanks
Hemalatha
-
Prudhvi Raju Namburi
Pegasystems Inc.
IN
Hi Hemalatha,
The above code helps to highlight the misspelled words; along with this we need to show suggestions(similar which happens with RTE spellcheck) when the misspelled word is clicked. Could you please let me know if you have implemented anything to meet this.
Thanks,
Jagadish
Bits in Glass
IN
Hi Jagadish,
For your question, I have provided you second option as to add SpellCheck action for Onchange Event for RTE.
So when user enters misspelled words, based on our code those will be highlighted. But for suggestion you need to tab out from RTE( to execute Onchange action) so that when user click on misspelled words suggestions will be displayed.
Thanks
Hemalatha