Question

Upon execution of the ckEditor I want a particular button be already clicked (programmatically). For example i want the button blockquote be already clicked: enter image description here so that when the user opens the ckEditor that function related to blockquote button is already fired. I saw it somewhere, but I don't remember it. It was something like

 dialoge.click ='blockquote ' or something 
Was it helpful?

Solution

in Config.js add the following:

CKEDITOR.on( 'instanceReady',function(ev) {
            ev.editor.execCommand( 'blockquote' );
        } );

note: The command is always in lower case. It's 'blockquote' or 'bulletedlist' rather than 'BlackQuote' or 'BulletedList'.

OTHER TIPS

Try this:

CKEDITOR.replace( 'editor1', {
    on: {
        instanceReady: function() {
            this.execCommand( 'blockquote' );
        }
    }
} );
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top