I don't use the helper (didn't know there was one). I just put the init code in an element and include that where I need it. See: http://book.cakephp.org/view/97/Elements. If you need to be able to specify different configurations, you can pass an array to the element then echo out the values into the javascript like:
<script type="text/javascript">
$().ready(function() {
$('textarea').tinymce({
// Location of TinyMCE script
// // General options
theme : "advanced",
plugins : "<?php echo $pluginsString ?>",
...
</script>
This is how I do it:
<?php
echo "\n".$javascript->link('jQuery/jquery-1.3.2',false);
echo "\n".$javascript->link('tiny_mce/jquery.tinymce.js',false);
echo "\n".$javascript->link('tiny_mce/tiny_mce.js',false);
?>
<script type="text/javascript">
$().ready(function() {
$('textarea').tinymce({
// Location of TinyMCE script
// // General options
theme : "advanced",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,|,image,link,unlink,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,|,pastetext,pasteword,|,fullscreen",
theme_advanced_buttons2 : "bullist,numlist,|,blockquote,|,anchor,cleanup,code,|,forecolor,backcolor,|,tablecontrols",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
relative_urls : false,
file_browser_callback : "fileBrowserCallBack"
});
});
function fileBrowserCallBack(field_name, url, type, win)
{
//var connector = "../../filemanager/browser.html?Connector=connectors/php/connector.php";
var connector = "<?php echo Router::url('/js') ?>/tiny_mce/filemanager/browser.html?Connector=connectors/php/connector.php";
var enableAutoTypeSelection = true;
var cType;
tinyfck_field = field_name;
tinyfck = win;
switch (type) {
case "image":
cType = "Image";
break;
case "flash":
cType = "Flash";
break;
case "file":
cType = "File";
break;
}
if (enableAutoTypeSelection && cType) {
connector += "&Type=" + cType;
}
window.open(connector, "tinyfck", "modal,width=600,height=400");
}
</script>
That callback function is for the Fck file manager/loader plugin for Tiny: http://freshmeat.net/projects/tinyfck/