Archive for the ‘CakePHP 1.1’ Category

Using TinyMCE with CakePHP

It’s finally my deadline. Oh well, I am not really a blogger so I just hope you’ll stick with my article. Please bear with my “work of art”. Duh?!?

Ok, let’s get this started. As the title says, my article is all about TinyMCE + Cakephp. This may not be too challenging or may appear newly baked for others but for me, it’s something worth writing for. There’s just a few blocks of information that I need to discuss and everything we’ll be done in a short while.

TinyMCE is a WYSIWYG editor by Moxiecode which is downloadable for free. It has been integrated with some of the fast-rising CMS in the OS community nowadays. Such would be joomla and drupal. Here, integrating is so easy, so just follow these steps and good luck:

  1. Download tinyMCE.
  2. Once downloaded, unpack TinyMCE, and copy just the tinymce/jscripts/tiny_mce folder in /webroot/js.
  3. Then follows the configuration. To make this thing work on cakephp, simple do these:
    1. First, add the code below to the layout(s) that will be used on the page(s) that will have the editor.
      
      
    2. Add the javascript helper to your $helpers array in your controller(s)
    3. Then, for each page that you would want the TinyMCE editor to show, just add to the top of the view file this code below:
      
      

Source: Bakery

Tags: