Hi,
I'm very new to both CKEditor and JQuery so please excuse me if I'm missing something really basic! I'm trying to add CKEditor with the JQuery adapter to a JSP page and whenever I try and initialize the adpater I get an is null error. I have the following in the head of the file:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="/secure/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="/secure/ckeditor/adapters/jquery.js"></script> <script type="text/javascript"> //<![CDATA[ $(function() { var config = { toolbar: [ ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'], ['UIColor'] ] }; // Initialize the editor. // Callback function can be passed and executed after full instance creation. $('.jquery_ckeditor').ckeditor(config); }); //]]> </script>
and then have created the text area as follows:
<textarea id="editor" class="jquery_ckeditor" name="editor"><c:out value='${html}'/></textarea>
When I load the page, the exact message is :
$(".jquery_ckeditor") is null
I've tried changing things around but nothing seems to work. Anyone have any thoughts on what I'm doing wrong? I've compared it to the JQuery Adapter sample and it seems to be right, but I'm obviously missing something.
Thanks,
Caroline