Spell Check on Rich Text Fields

Salesforce now supports using browser based spell check on Rich Text fields, but it seems that the Skuid UI does not support this functionality for Rich Text fields. Is this a setting that can be changed? Our users are asking for the suggested spelling options that the browser spell checker offers for Salesforce Rich Text fields within the Skuid UI, but I can’t seem to find spell check as an option. 

Are you referring to the red little lines that show underneath a misspelled word? I see those work in text areas like Account Description in Skuid.

However, the Rich Text component doesn’t have this functionality attached to it yet unfortunately.

This would make a phenomenal “Idea” if you’d like me to change the category here in the community so that our design team can see this, I’d be happy to do that for you.

Thank you, Stephen, if you could add it to ideas that would be very helpful. 

I was referring to the browser spell check that provides spelling suggestions when you right click, but for some reason the Skuid Rich Text fields don’t seem to support this. Right clicking on a red underlined word only gives Copy, Paste, and Cut options. 

Yes please :slight_smile:

On other forms some have stated javascript on the Visual force pages can be used to turn rich text spell checker on. Is it possible for Skuid to add spellcheck to true for Skuid pages?

“By default spell check is turned off for all the rich text fields in salesforce . But this can be fixed , if we have custom vf page then we can run following jquery script to update the spell check flag on rich text field to true:

$(‘iframe[id*=shareCandidateBody]’).contents().find(‘body’).attr(‘spellcheck’,‘true’);”

I found this online. Is this something that could work with SKuid?

Thankfully, CKEditor generally plays well with the native spell-checkers, just as long as you don't have the right-click menus of CKEditor enabled (Spring 16 doesn't).

So, in order to switch on the spell-checker (with a hack), all you need to do is tweak the configuration of the editor once Salesforce has set it up.

Assuming that you have jQuery on your pages already you can put the following script towards the top of the visualforce page or component:

``` ``` That is, when CKEditor fires its instanceLoaded event, we get a handle on the instance of the CKEditor, and change the configuration so the spell checker is no longer disabled.

Sarah/Rich,

Zach posted here about how to modify the CKeditor configuration.  I worked up this custom field render based on his sample and Rich’s research on the editor configuration.

Put this into a snippet and run it as the custom render for your Rich Text Field.  This worked in my developer org. on Skuid 11.0.3.

Note that this does not provide suggestions.  It only underlines any misspellings with a red line.

Thanks,

Bill

var field = arguments[0],
    value = skuid.utils.decodeHTML(arguments[1]);
    field.options.ckEditorConfig = {
    disableNativeSpellChecker: false 
    };
    console.log(‘CKEditor options’);
    console.log(field.options.ckEditorConfig);
    skuid.ui.fieldRenderers[field.metadata.displaytype]field.mode;

Awesome Bill!  Much appreciated.  Send me your email if you get the chance. This works as advertised in Millau.