Mon 9 Jun 2008
Setting up TinyMCE with jQuery and CakePHP 1.2
Filed in PHP, Javascript, Web DevelopmentAdd your comments
CakePHP uses the Prototype Javascript library for its ajax helper class but I’ve come to prefer jQuery. Prototype is a fine library too but I’ve just gotten used to jQuery.
A web application I’m working on needed a ttw html editor so I grabbed TinyMCE and copied in some of the example code and everything seemed to work fine at first glance. Unfortunately TinyMCE has an issue with jQuery’s $(document).ready function and it also has an issue with saving via ajax in CakePHP.
There’s a helpful page on the Bakery that outlines some issues you’ll run into trying to get CakePHP & Prototype working with TinyMCE but it’s a little out of date now (I’m using CakePHP 1.2RC1, TinyMCE 3.09 and jQuery 1.2.6 at the moment). I’ll go through examples that illustrate how I solved the two problems I ran in to but I’m not going to explain everything you need to do ajax submissions with CakePHP.
Read the rest of “Setting up TinyMCE with jQuery and CakePHP 1.2″…