views:

16

answers:

1

I have a global size and height set

CKEDITOR.editorConfig = function( config )
{
  config.height = '400px';
  config.width = '600px';
  ...

And I would like to change this height and width for only one instance of the editor on a seperate page. Has anyone else accomplished this?

+1  A: 

Yes. When you create the editor on the page, you can override

CKEDITOR.replace(editorName, {
            height: 448,
            width: 448,
            customConfig: '/path/to/yourconfig.js'
});

In fact as a performance recommendation you can put all the configuration options here and save the loading of the config file separately. You might do this in a shared JavaScript file of your own, parametrized to override specific values for a page.

UPDATE in response to comment

A separate config file can be used like any other setting (look above with customConfig. If you don't want any custom configs loaded use

customConfig: ''
dove
Thanks Dove! Really appreciate it!
Trip
in response to performance recommendation, I tried that, but my syntax was wrong I guess? CKEDITOR.replace(editorName, config) where config was a file alongside config.js called otherConfig.js .
Trip
@Trip I've updated the answer if that'll help
dove
Thanks so much Dove!
Trip