Use an id rather than class name to reference the textarea (add id="editor" to the textarea).
First, you should probably move your javascript call to just before </body> so it loads after the page..
I wouldn't recommend using an id, because it makes it more difficult to have multiple ckeditors on one page, so I always use just the class.
<textarea class="ckeditor" name="editor"></textarea>
To initialize it, just use:
<script type="text/javascript">
CKEDITOR.replace(jQuery('.ckeditor'));
</script>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community