I have a site using CKEditor 3.1 build 4891. All of the instances are replaced by using replaceClass (using default 'ckeditor'). I have added lines to config.js to set a generic width and height for all instances on the site:
This all works great. For a couple particular instances, I need the width and height to be different. The only way I have found to work is to remove the class="ckeditor" from that <textarea> and use the manual CKEDITOR.replace('element',{width:'30%',height:'200px'}) in the HTML after the element's declaration. I would prefer a method using an external javascript, but these code samples do not work:
Without altering config.js any further and still using replacement by class name, how can I customize a single instance of the editor from an external JS file in the <head> element?
CKEDITOR.editorConfig = function( config ) { config.width="70%"; config.height="400px"; }
This all works great. For a couple particular instances, I need the width and height to be different. The only way I have found to work is to remove the class="ckeditor" from that <textarea> and use the manual CKEDITOR.replace('element',{width:'30%',height:'200px'}) in the HTML after the element's declaration. I would prefer a method using an external javascript, but these code samples do not work:
/* in a second javascript file loaded on only that page */ CKEDITOR.editorConfig = function( config ) { config.width="30%"; config.height="200px"; };
/* in a second javascript file loaded on only that page */ CKEDITOR.config.width='30%'; CKEDITOR.config.height='200px';
Without altering config.js any further and still using replacement by class name, how can I customize a single instance of the editor from an external JS file in the <head> element?