ckeditor $ is not defined
ckeditor gem assumes that you load your JavaScripts at the top of your page instead of the bottom.
I used the SimpleForm integration by setting the textarea input field parameter to :as => :ckeditor which inserts the following code beneath your textarea:
//<![CDATA[ $(document).ready(function(){ if (CKEDITOR.instances['paper_abstract']) {CKEDITOR.remove(CKEDITOR.instances['unique_id_of_your_textarea_goes_here']);}CKEDITOR.replace('unique_id_of_your_textarea_goes_here', {"language":"en","rows":10,"toolbar":"Full","class":["ckeditor","required"],"required":true,"placeholder":"Please enter an abstract."}); }); //]]>
However, if you load your JavaScript at the bottom of the page instead of the top, you’ll see this error in your Firebug Console: ‘$ is not defined’
My current solution was to not use the :as => :ckeditor parameter but instead call the above JavaScript code from within a js that gets loaded at the top of the page.
ckeditor $ is not defined,