Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>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: <a href="http://book.cakephp.org/2.0/en/views.html#elements" rel="nofollow noreferrer">http://book.cakephp.org/2.0/en/views.html#elements</a>. 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:</p> <pre><code> &lt;script type="text/javascript"&gt; $().ready(function() { $('textarea').tinymce({ // Location of TinyMCE script // // General options theme : "advanced", plugins : "&lt;?php echo $pluginsString ?&gt;", ... &lt;/script&gt; </code></pre> <p>This is how I do it:</p> <pre><code>&lt;?php echo "\n".$javascript-&gt;link('jQuery/jquery-1.3.2',false); echo "\n".$javascript-&gt;link('tiny_mce/jquery.tinymce.js',false); echo "\n".$javascript-&gt;link('tiny_mce/tiny_mce.js',false); ?&gt; &lt;script type="text/javascript"&gt; $().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 = "&lt;?php echo Router::url('/js') ?&gt;/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 &amp;&amp; cType) { connector += "&amp;Type=" + cType; } window.open(connector, "tinyfck", "modal,width=600,height=400"); } &lt;/script&gt; </code></pre> <p>That callback function is for the Fck file manager/loader plugin for Tiny: <a href="http://freshmeat.net/projects/tinyfck/" rel="nofollow noreferrer">http://freshmeat.net/projects/tinyfck/</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload