Hi
I have multiple instance of ckeditor on my page, but when I try to make an operation on all of them at the same time using jQuery, only the first one works.
exemple:
I can instanciate all of them with 1 call. All 3 ckEditor instance will be created.
But if I want to set them read-only using the same selector, only the first one will be read-only.
I don't understand.
Thanks
I have multiple instance of ckeditor on my page, but when I try to make an operation on all of them at the same time using jQuery, only the first one works.
exemple:
<label for="editor1">Editor 1:</label> <textarea cols="80" id="ckeditor1" name="ckeditor1" rows="2">ck editor 1</textarea> <label for="ckeditor2">Editor 2:</label> <textarea cols="80" id="ckeditor2" name="ckeditor2" rows="2">ck editor 2</textarea> <label for="ckeditor3">Editor 3:</label> <textarea cols="80" id="ckeditor3" name="ckeditor3" rows="5">ck editor 3</textarea>
I can instanciate all of them with 1 call. All 3 ckEditor instance will be created.
$('[id*="ckeditor"]').ckeditor(config);
But if I want to set them read-only using the same selector, only the first one will be read-only.
I don't understand.
$('[class*="ckeditor"]').ckeditorGet().setReadOnly();
Thanks
Re: Select multiple instance of ckeditor using jquery don't
Re: Select multiple instance of ckeditor using jquery don't
It works very well. Thanks a lot for your help and for your quick response.
You just save me a big headache.
Holstein
Re: Select multiple instance of ckeditor using jquery don't
I have descriptions in multiple languages and I am trying to make one of the text areas read only, to ensure that the Spanish person cannot edit the English version of the text.
The English text is required to allow the Spanish person to translate the text.
I implemented the following
$( ".ckeditor_readonly").ckeditorGet().setReadOnly();
And changed the class on the text area as follows:-
<textarea name="categories_description[1]" cols="750" rows="300"
class="ckeditor ckeditor_readonly">Individuals with sluggish adrenals etc etc
</textarea>
But you are still able to edit the text in the box.
Your help will be appreciated.
Thanks
Tony