How do I pass in config info to CKEditor using the jQuery adapter?

Viewed 25966

I'm using the latest CKeditor with jQuery adapter.

I have successfully got it to work, and display.

However, as I am completely new to CKeditor, how do I pass in config variables using the jQuery method?

This is what I've got

$( '#input-content' ).ckeditor('', {
    toolbar: 'basic'
});

I think from what I've read, the first argument is meant to be a callback, and the 2nd the config. But doing this has not changed the editor at all.

How do I use these config properties etc using the jQuery adapter?

7 Answers

I passed an empty function...

$('textarea#my').ckeditor($.noop, {
    property: 'value'
});
 $(document).ready(function(){
     $('.reply').click(
     function(event){
         // Event click Off Default
         event.preventDefault();
         // CKEditor
         $(function(){
             var config = {toolbar:[['Bold', 'Italic', '-', 'Link', 'Unlink']]};
            //<?php /*echo"var config = {toolbar:[['Bold', 'Italic', '-', 'Link', 'Unlink']]};" ;*/ ?>
             // DOM class = "cke"
             $('textarea.cke').ckeditor(function(){}, config);                
         });
         return false;
     });
 });
Related