Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I use this steps to add ckeditor to my codeigniter apps:</p> <p>1) Download these files:</p> <ul> <li>This for Ckeditor: <a href="http://pastebin.com/fkK9e0RR">http://pastebin.com/fkK9e0RR</a></li> <li>This for Ckfinder: <a href="http://pastebin.com/SvyypmX4">http://pastebin.com/SvyypmX4</a></li> </ul> <p>2) Copy the files you just downloaded into your <strong>Application/libraries</strong> folder</p> <p>3) Download the ckeditor helper here: <a href="http://pastebin.com/Cd3GqYbx">http://pastebin.com/Cd3GqYbx</a></p> <p>4) Copy the last file in <strong>application/helper</strong> folder as <strong>ckeditor_helper.php</strong></p> <p>5) Download the CKeditor controller here: <a href="http://pastebin.com/UD0bB9ig">http://pastebin.com/UD0bB9ig</a></p> <p>6) Copy the controller in your <strong>application/controllers</strong> folder as <strong>ckeditor.php</strong></p> <p>7) Download the main ckeditor project from the official site: <a href="http://ckeditor.com/download/">http://ckeditor.com/download/</a></p> <p>8) Copy the ckeditor folder you just download into your asset folder (if you want you can also download the ckfinder project and put it in the same folder)</p> <p>9) Add these line of js to your view file (adjust the path):</p> <pre><code>&lt;script type="text/javascript" src="/asset/ckeditor/ckeditor.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/asset/ckfinder/ckfinder.js"&gt;&lt;/script&gt; </code></pre> <p>10) In your controller add this php code and adjust the path:</p> <pre><code>$this-&gt;load-&gt;library('ckeditor'); $this-&gt;load-&gt;library('ckfinder'); $this-&gt;ckeditor-&gt;basePath = base_url().'asset/ckeditor/'; $this-&gt;ckeditor-&gt;config['toolbar'] = array( array( 'Source', '-', 'Bold', 'Italic', 'Underline', '-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','-','NumberedList','BulletedList' ) ); $this-&gt;ckeditor-&gt;config['language'] = 'it'; $this-&gt;ckeditor-&gt;config['width'] = '730px'; $this-&gt;ckeditor-&gt;config['height'] = '300px'; //Add Ckfinder to Ckeditor $this-&gt;ckfinder-&gt;SetupCKEditor($this-&gt;ckeditor,'../../asset/ckfinder/'); </code></pre> <p>11) In your view print the editor with:</p> <pre><code>echo $this-&gt;ckeditor-&gt;editor("textarea name","default textarea value"); </code></pre>
 

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