I was able to finally get multiple instances of CKEDITOR working fine on the same page but when I use
<script>
CKEDITOR.replace( 'txtAA' );
CKEDITOR.config.height = 100;
CKEDITOR.config.toolbarCanCollapse = true;
</script>
in more than one place it resizes ALL 3 instances even though I have a different value for each instance.
It seems to select the last instance and use that as the default for all 3
Is there a way around this behavior?
Thanks
Read about setting
Read about setting configuration, because you're doing it in the wrong way.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
So Steve Jobs is still alive?
So Steve Jobs is still alive? :) "because you're holding it in the wrong way"
I was able to make it work even if it was wrong. But thanks for the link and the reply.
The fact that something seems
The fact that something seems to work does not mean that you're supposed to do it that way. And well - in your case it didn't really work - did it? ;)
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
It didn't work when I posted
It didn't work when I posted the question correct. I do have it working now. I didn't see an answer on the page you linked to and it would be very helpful to actually show what was wrong, why it is wrong, and how to do it correctly.
I'm new to CKEditor, but to
I'm new to CKEditor, but to the best of my understanding:
As you've found, CKEDITOR.config is the global config that applies to all editor instances. Whenever an editor instance is created, it inherits settings from this global config. When you create an editor instance, you have the opportunity to define additional editor specific configuration settings, or override global configuration settings. It sounds like this is what you want to do.
When you call CKEDITOR.replace(), you can pass a second argument that is an object containing your desired config settings. For instance, instead of:
You can do:
If you have a specific custom editor configuration that you find yourself reusing, you can define this configuration in a custom .js config file. When creating a new editor instance, you can load the custom config file like this:
Remember, CKEDITOR is not an editor instance. Editor instances are CKEDITOR.editor objects. When you call CKEDITOR.replace(), it creates a CKEDITOR.editor object and returns that object. If you'd like to save a reference to a specific editor instances so you can easily work with that instance later in your code, you can assign the return value of CKEDITOR.replace() (a CKEDITOR.editor object) to a variable:
Then you can easily access the CKEDITOR.editor methods for that instance. e.g.:
Hope this helps.