Tomáš Pastorek Tomáš Pastorek - 4 months ago 10
Javascript Question

How to use CKEditor as form input?

I am trying to make simple web editor using CKEditor but i cant find out how to make it work.

First i checked their samples site. Only thing they do to make CKEditor work is include .js file and add ckeditor class to form textarea element.

<script src="../ckeditor.js"></script>
<textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10">

So i copy .js file and try it in my own folder and when i run php script whole textarea element is hidden and doesnt create CKEditor panel as it should like in this sample page. There might be some javascript configuration but i havent found any in source code of sample page.

  1. Copy all your ckeditor folder to server
  2. add it to html page ;like <script src="../script/ckeditor/ckeditor.js" type="text/javascript"></script>
  3. assign CSS class of textarea to ckeditor; like class="ckeditor".