Ask your Symfony questions! Pay money and get answers fast! (more info)

How do I add TinyMCE to a generated module? Symfony

Symfony 1.4, using Propel.

I need to add TinyMCE to a generated module. I started by going here:

[[LINK href=""]][[/LINK]]

I installed sfFormExtraPlugin.

to config/view.yml I added:

javascripts: [ /js/tiny_mce/tiny_mce.js ]

I checked this path from the command line to be sure the permissions are good.

I changed the form class:

class WebForm extends BaseWebForm
public function configure()

$this->widgetSchema['html'] = new sfWidgetFormTextareaTinyMCE();


I clear the cache:

symfony cc

This has no effect. What else should I do?

I see this in the source HTML:

<div class="content-input"><textarea name="web[html]" id="web_html"></textarea><script type="text/javascript">
mode: "exact",
elements: "web_html",
theme: "advanced",

theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: true


Or maybe this is more of a Javascript question: this block is appearing inside of jQuery's Fancybox. The main TinyMCE file is included in the main layout, but not in the layout that appears inside of the lightbox.

Hmm, let me put this differently. How do I override an action? (I am trying different strategies, trying to get this to work).

Right now I have this:


require_once dirname(__FILE__).'/../lib/webGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/webGeneratorHelper.class.php';

class webActions extends autoWebActions

public function executeIndex(sfWebRequest $request)

echo "hi";
// 2012-11-02 - we need to find out if this user
// has already created a web page or not, and then we
// need to send them to the edit page or the new page
// depending on the answer.
$c = new Criteria();
$c->add(AppPeer::SF_GUARD_USER_ID, $this->getUser()->getGuardUser()->getId());
$app = AppPeer::doSelectOne($c);
if ($app) {
$c2 = new Criteria();
$c2->add(AppModulPeer::TITLE, 'WEB');
$c2->add(AppModulPeer::APP_ID, $app->getId());
$app_modul = AppModulePeer::doSelectOne($c2);
if ($app_modul) {

This is a module called 'web' (where the customer can create their own web page). For the most part, it is being handled by a generator. But I would like to override the index function. I can not figure out how to do that.

Answers (0)

No answers yet.