TFCKEditor
[ class tree: TFCKEditor ] [ index: TFCKEditor ] [ all elements ]
TFCKEditor Documentation (Version 0.3)

TFCKEditor Documentation (Version 0.3)

Author: Mark Leavy

Requirements

Installation

  • Extract the TFCKEditor archive to a directory of your choosing. Make sure this directory is in PRADO's namespace. For example you might have something like this in your application.spec:

    <using namespace="MyApp.global.mycomponents" />
  • Extract the 'editor' directory of the FCKeditor archive to /path/to/yoursite/js/fckeditor/ so you end up with a structure similar to:

    /www/mysite/js/fckeditor
    /www/mysite/js/fckeditor/fckconfig.js
    /www/mysite/js/fckeditor/editor

Configuration

Edit /path/to/yoursite/js/fckeditor/editor/filemanager/browser/default/connectors/php/config.php and add the line:

$Config['UserFilesPath'] = '/userfiles/';

..where /userfiles/ is the path to the directory to be used in the file manager, relative to the DocumentRoot.

Edit /path/to/yoursite/js/fckeditor/fckconfig.js and add/uncomment the following lines to use the PHP connectors:

FCKConfig.LinkBrowserURL = ... + '...connectors/php/connector.php';
FCKConfig.ImageBrowserURL = ... + '...connectors/php/connector.php';

Also edit any other configuration variables in this file to suite your setup if you need to.

Example Usage

  1. //Test.php
  2.  
  3. class FCKTest extends TPage
  4. {
  5. function onInit ($param )
  6. {
  7. parent::onInit($param);
  8.  
  9. //use the basic editor
  10. $this->content->Editor->setToolbar('Basic');
  11. //or use the Default editor
  12. //$this->content->Editor->setToolbar('Default');
  13.  
  14. //use the default skin
  15. $this->content->Editor->setSkin('Default');
  16. //or use the Office2003 Skin
  17. //$this->content->Editor->setSkin('Office2003');
  18. }
  19. }
  20.  
  21. //Test.tpl
  22. <com:TForm>
  23. <com:TFCKEditor ID="Editor" />
  24. </com:TForm>

Alternatively you can set the options in the template.

  1. //Test.tpl
  2. <com:TForm>
  3. <com:TFCKEditor ID="Editor" Toolbar="Default" Skin="Silver" />
  4. </com:TForm>

Feedback

If you have any problems or suggestions please let me know

Thanks, Mark


Documentation generated on Sat, 30 Apr 2005 00:07:18 +0100 by phpDocumentor 1.3.0RC3