Business, Tech, Life, and Whatever else

CodeIgniter with TinyMCE

by Eric Barnes on March 4, 2009

I had an email yesterday from a guy that wanted to know how to integrate TinyMCE into a CodeIgniter project. This is actually pretty easy and I thought it would be a good idea to share how I do it.

Step 1
Visit TinyMCE website and download the script. I always download the Main package.

Step 2
Now place the TinyMCE files in a directory. I normally use /js or /javascript. Here is an example directory structure:

/js/
/system/
/index.php

Step 3
Now open the view file you want to integrate TinyMCE in and above your form add:

<script type="text/javascript" src="'.base_url().'/js/tinymce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
	mode : "textareas"
});
</script>

You will need to enable the url helper to use the base_url function.
After that you should have a working editor.

You May Also Be Interested In...

68 Classifieds TinyMCE Module
February 12, 2009

68KB – TinyMCE Integration
November 14, 2008

Code Igniter Template Tutorial
July 7, 2008

Integrate SimplePie with 68 Classifieds
September 1, 2009

Subscribe Now

If you enjoyed this post, you will definitely enjoy my others. Subscribe to the feed to get instantly updated for those awesome posts soon to come.


  • Glad to help! :)
  • albertomarlboro
    It works like a charm, thanks for share !
blog comments powered by Disqus