PFBC 3.1 and TinyMCE or CKEditor

291 views
Skip to first unread message

Michel Cote

unread,
Jun 7, 2013, 1:32:01 PM6/7/13
to php-form-bu...@googlegroups.com
Hi,

I'm trying to use either TinyMCE or CKEditor with my PFBC form.

I have the latest PFBC installed, it's loading fine for every other fields but will only show a regular textarea box for eith TinyMCE and CKEditor.

Heres the code I have to load the editors, it a copy from the PFBC webpage with a few modifications:

$form->addElement(new Element\TinyMCE("Instructions:", "Instructions"));
$form->addElement(new Element\CKEditor("Instructions:", "CKEditor"));

Even when I go to the PFBC website (http://www.imavex.com/pfbc3.x-php5/examples/form-elements.php) and look at the boxes listed there I can't see any controls.

I've tried with:
Chrome (Version 27.0.1453.110 m)
Firefox (21.0)
IE (8.0.6001.18702)

Anyone know how to make it work?

Thanks.

Joe

unread,
Jun 11, 2013, 8:49:02 PM6/11/13
to php-form-bu...@googlegroups.com
Michael,

Same thing was happening to me. I banged my head against it for quite a while. I don't remember exactly what I changed, but it fixed it. I believe it was a file inclusion issue on the JS. Check your Element/TinyMCE.php file and see if the script call has a slash in front of it. If it doesn't, try adding it and see if that makes any difference. It isn't just the editors. The sort element on your link doesn't work, either. That seemed to be a hint to me that the script file wasn't being called correctly.

Good luck.

Joe

unread,
Jun 11, 2013, 8:56:27 PM6/11/13
to php-form-bu...@googlegroups.com
It occurs to me after I posted my response that while the theory was sound, the execution was flawed. If the sort doesn't work, it doesn't have anything to do with those two fields. Instead, look in your Form.php around line 57 for the following:

$this->resourcesPath = "/PFBC/Resources";

Kill that leading slash and see if it makes any difference. If you're running a test site from a subdirectory, that's obviously going to cause problems.

Sorry about that.
Reply all
Reply to author
Forward
0 new messages