CKEditor is the most popular open source WYSIWYG editor for web development. What makes it so great in my opinion is that you do NOT have to use server side script to manage it. But if that’s your thing, don’t worry, it has those options too.
To start off let’s just make a quick file structure by creating in index.html, a js folder that will contain your ckeditor files and jquery library file.
The js/ckeditor folder contains the, latest at the time of this post, library downloaded from the ckeditor website. I have removed all of the unnecessary files in implementing ckeditor with jquery.
1. Download latest jquery library to your file structure.
2. Download latest ckeditor library to your file structure.
3. Remove all unneeded ckeditor files.
Now that you have your file structure set up, we can start looking into the html file. Here is what we will be doing:
2. Create a textarea html element inside a form tag. (Creating it in a form tag allows the save button to submit the form when you click it.)
3. Write the code to initiate the ckeditor.
As you can see below you add all the <script> tags to include the jquery library, ckeditor library, and the ckeditor adapter for jquery.
HERE IS WHAT YOU SHOULD HAVE WHEN YOU ARE DONE.
So there you have it, quick and simple way to initiate the ckeditor via jquery.
What’s next? How about using it. Removing things from the toolbar, overriding the save button, and maybe even creating your own custom drop down or select.
How often do you work with tables? I work with them quite a bit and styling t read more...
UPDATE!! A plugin is now available for this tutorial that includes more features read more...
There seems to be a lot of misconceptions on the difference between the document read more...
Greetings All! Since everyone was digging the Star Comment Rating I decided that read more...