2

I have a requirement for "Spell Check" feature on a certain custom field (Notes - Long Text Area) of a custom object. I researched and found that if Rich Text Area field can be used instead, but it seems RTA field too does not support spell check option. Has anyone faced similar issue? If yes, how did you get it resolved?

Some Points :

  1. Customer's browser is IE 8 so default spell check functionality is not available
  2. App Exchange products not recommended due to compliance factors. However, if someone has good product solution for same, please let me know.
1

1 Answer 1

4

As stated in the comment CK Editor already has this. The problem is how to enable it :-) It is not a setting of <apex:textarea> You will have to do some javascript to enable it... If it's a custom page you can put on the top (just after <apex:page.....>:

<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"/>
<script>
 var $j = jQuery.noConflict();
$j(document).ready(function(){

CKEDITOR.on('instanceReady', function(e) {
    if (e.editor.config.magic) return;
    var target = e.editor.config.bodyId;
    var name = e.editor.name;
    e.editor.destroy();

    CKEDITOR.editorConfig = function( config ) { config.magic = true; }
    CKEDITOR.replace(name, {
                height : 600, 
                bodyId : target
    });
});
});
</script> 

If it is a standard page you can override this as such:

<apex:page standardController="MyObject">
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"/>
    <script>
     var $j = jQuery.noConflict();
    $j(document).ready(function(){

    CKEDITOR.on('instanceReady', function(e) {
        if (e.editor.config.magic) return;
        var target = e.editor.config.bodyId;
        var name = e.editor.name;
        e.editor.destroy();

        CKEDITOR.editorConfig = function( config ) { config.magic = true; }
        CKEDITOR.replace(name, {
                    height : 600, 
                    bodyId : target
        });
    });
    });
    </script> 
<apex:detail relatedList="true">
</apex:page>

If you don't want all the options of the CK Editor available to your user you can create a custom list of buttons to show in the editor. Just go to the CK Editor's man pages and get the info from there.

1
  • Where to add this to make it work for a standard page?
    – user26638
    Commented Nov 25, 2015 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .