Current Record: widget:editor #35

widget:editor fields.ini directive Return to fields.ini file Table of Contents widget:editor fields.ini directive Allowed Values Examp...

Current Record: widget:editor #35

widget:editor fields.ini directive Return to fields.ini file Table of Contents widget:editor fields.ini directive Allowed Values Examp...

widget:editor

[Permalink]

widget:editor fields.ini directive

Return to fields.ini file

The widget:editor directive is applicable in the fields.ini file. It specifies the type of HTML editor that should be used. This directive is only used when widget:type is set to htmlarea?. Xataface currently supports FCKEditor, TinyMCE, and NicEdit.

Allowed Values

Value Description Version
fckeditor Use FCKEditor. This is the default value. all
tinymce Use TinyMCE editor. 0.6
nicedit Use NicEdit. 1.0.5

Examples

Example 1: Using FCKEditor

Given a field 'content' that you wish to be able to edit with FCKEditor, you would have the following section in your fields.ini file:

[content]
    widget:type=htmlarea
    widget:editor=fckeditor

Note that since FCKEditor is the default editor, the above would give the same result as:

[content]
    widget:type=htmlarea

Example 2: Using TinyMCE

Further from example 1, if we wanted to use TinyMCE editor, we would change our directive to:

[content]
    widget:type=htmlarea
    widget:editor=tinymce

Example 3: Using NicEdit

Further from example 1:

[content]
    widget:type=htmlarea
    widget:editor=nicedit

Enabling Image Uploads

By default image uploads are disabled in these WYSIWYG editors.

Enabling Image Uploads in FCKEditor

  1. Create a directory named uploads inside your application directory. e.g.
    cd /path/to/myapp/uploads
  2. Make the uploads directory writable by the webserver. e.g.
    chmod 777 /path/to/myapp/uploads
  3. Edit the lib/FCKeditor/editor/filemanager/connectors/php/config.php file inside your xataface directory so that:
    $Config['Enabled'] = true ;
    $Config['UserFilesPath'] = '/url/to/myapp/uploads/' ;
        // The path portion of the URL to your uploads directory.
        // e.g. if your uploads directory is accessible at
        // http://example.com/myapp/uploads, then this value should
        // be /myapp/uploads/
    $Config['UserFilesAbsolutePath'] = '/path/to/myapp/uploads/' ;
        // The absolute file system path to your uploads directory.
        // e.g. if your uploads directory is located at
        // /home/myhome/www/myapp/uploads, then this value should be
        // /home/myhome/www/myapp/uploads
  4. Now when you click on the "Add Image" link in your HTML editor, it will allow you to upload images and browse existing uploaded images.
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved