Project / Support Center
Welcome, Guest. Please login or register. December 11, 2019, 04:09: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  FCK/CKEditor  |  Topic: Version 3.X installation guide 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Version 3.X installation guide  (Read 6518 times)
admin
Guest
« Reply #1 on: April 25, 2010, 11:12: PM »

tep 1: Loading CKEditor
CKEditor is a JavaScript application. To load it, you just need to include a single file reference at your page. Supposing that you have installed CKEditor at the "ckeditor" directory at the root of your web site, here you have an example:

<head>
   ...
   <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
</head>
With the above file loaded, the CKEditor JavaScript API is ready to be used.

Attention: be sure to use the original file name ("ckeditor.js") when including it in your pages. If you instead want to use a different file name, or even merge the CKEditor script into another JavaScript file, then be sure to look at the Specifying the Editor Path page.

Step 2: Creating an Editor Instance
CKEditor works just like a textarea in your page. While the editor offers a user interface to easily write, format and work with rich text, the same thing could be achieved, not that easily, with a textarea, requiring the user to type HTML code inside of it.

But, as a matter of fact, CKEditor uses a textarea to transfer its data to the server. The textarea is invisible to the end user. So, to create and editor instance you must, ironically, create a textarea first:

<textarea name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>
Note that, if you want to load data into the editor, from a database for example, just put that data inside the textarea, just like the above example.

In this example, we have named our textarea "editor1". This name can be used in the server side later, when receiving the posted data.

Now, using the CKEditor JavaScript API, we "replace" the plain textarea with an editor instance. A single JavaScript call is needed for that:

<script type="text/javascript">
   CKEDITOR.replace( 'editor1' );
</script>
This script block must be included at any point "after" the <textarea> tag in the page. You can also call the replace function inside <head>, but you need to listen for the "window.onload" event in such case:

<script type="text/javascript">
   window.onload = function()
   {
      CKEDITOR.replace( 'editor1' );
   };
</script>
Step 3: Saving the Editor Data
As previously described, the editor works just like a <textarea> field. So, when submitting a form containing an editor instance, its data will be simply posted, using the textarea name as the key to retrieve it.

For example, following the above example, in PHP we would do something like this:

<?php
$editor_data = $_POST[ 'editor1' ];
?>
Client Side Data Handling
Some applications (like Ajax applications) need to handle all data at the client side, sending it to the server by its own ways. In such case, it's enough to use the CKEditor API to easily retrieve an editor instance data. For example:

<script type="text/javascript">
   var editor_data = CKEDITOR.instances.editor1.getData();
</script>
Complete Sample
<html>
<head>
   <title>Sample - CKEditor</title>
   <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
</head>
<body>
   <form method="post">
      <p>
         My Editor:

         <textarea name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>
         <script type="text/javascript">
            CKEDITOR.replace( 'editor1' );
         </script>
      </p>
      <p>
         <input type="submit" />
      </p>
   </form>
</body>
</html>
Report to moderator   Logged
admin
Guest
« on: December 08, 2009, 04:03: PM »

Why these people do this is beyond us since everyone under the sun looks for something called Installation - instead they choose to call it integration - which I suppose is correct technically.

but heres the link with installation guide of what you need to do

http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Integration

I suspect the same is true for the older version as well
Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  FCK/CKEditor  |  Topic: Version 3.X installation guide « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!