Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)
With the spring '12 coming over these days, the old "hack" to convert the rich editor will not work any more. What can be done to retain full CKEditor functionality after spring 12?

1 Answer

0 votes
by (32.1k points)

CKEditor is actually a new object instead of URL based and a new approach is required. The following script will help replace factory editor layout with a full version allowing additional formatting options:

$(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

            });

        });

    });

Result of the above script:

enter image description here

Browse Categories

...