0

I want to use full mode editor on Visual force page in Communties

1
  • 2
    can you please explain your problem in more detail??
    – Eric
    Nov 1, 2014 at 15:08

1 Answer 1

1

We've used this to give more options to the Rich Text editor. Bear in mind that you'll need to include jQuery in your page too. I use static resources:

<apex:includeScript value="{!URLFOR($Resource.for__JQueryZip,'js/jquery-latest.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.for__JQueryZip,'js/jquery-ui-latest.custom.min.js')}"/>

 <script>
    $(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 : 490, 
                        bodyId : target,
                        toolbar :
                        [
                            { name: 'basicstyles', items : [ 'Bold','Italic' ] },
                            { name: 'paragraph', items : [ 'NumberedList','BulletedList' ] },
                            { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] },
                            { name: 'styles', items : [ 'Styles','Format' ] }
                        ]
            });
        });
    });
</script>

You must log in to answer this question.

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