NAME

Egg::Plugin::WYSIWYG::FCKeditor - Plugin to use FCKeditor that is WYSIWYG.

SYNOPSIS

use Egg qw/ WYSIWYG::FCKeditor Tools /;

my $fck= $e->fck;

# Input form HTML source for FCKeditor is obtained.
$e->stash->{fck_input_form}= $fck->html;

# The JAVA script for FCKeditor is obtained.
$e->stash->{fck_javascript}= $fck->js;

# The received source is used with the template etc.

DESCRIPTION

It is a plugin to use FCKeditor.

FCKeditor is WYSIWYG HTML editor distributed under LGPL.

An original distribution site is here. http://www.fckeditor.net/

It is necessary to be installed in the site that FCKeditor uses beforehand to use this plugin.

In addition, please load Egg::Plugin::Tools by the controller.

INSTALL

The directory of the name 'FCKeditor' is made for the document route of and the project.

The document route of the project is a place set to dir->{htdocs} of the configuration.

If it is default, it is "[PROJECT_ROOT]/htdocs".

When the package is downloaded on the distribution site of FCKeditor, it defrosts in a suitable place, and all fckeditor.js and the editor directory in that are arranged in this 'FCKeditor'.

The preparation for using FCKeditor by this is completed.

Any name of the directory made in the document route is not cared about.

Please set the name of the made directory to 'base_uri' of the configuration.

CONFIGURATION

The configuration is set with 'plugin_wysiwyg_fckeditor' key.

plugin_wysiwyg_fckeditor => {
  ............
  ....
  },

width

Width of input form.

Default is '100%'

width => '100%',

height

Width of length of input form.

Default is '450px'.

height => '450px',

style

Style of input form.

Default is "width:[width]; height:[height]".

instance

Parameter name of input form.

Default is 'FCKfield'.

The content input to FCKeditor will be received by this name.

instance => 'FCKfield',

tool_bar

Setting of toolbar of FCKeditor.

Default is 'Default'.

tool_bar => 'Default',

base_uri

URI of the place where the component of FCKeditor was installed is set.

Default is '/FCKeditor'.

base_uri => '/FCKeditor',

METHODS

fck

The Egg::Plugin::WYSIWYG::FCKeditor::handler object is returned.

my $fck= $e->fck;

HANDLER METHODS

new

Constructor. When the fck method is called, it is called internally.

is_compat

The interchangeability of FCKeditor is judged.

'Html' method refers to this. I do not think that there is a thing used from the application usually.

if ($fck->is_compat) {
   .........
} else {
   .........
}

html ([OPTION_HASH])

The HTML source for the input form of FCKeditor is returned.

When OPTION_HASH is passed, the configuration is overwrited.

my $inputo_form= $e->fck->html(
  width => '500px', height => '300px',
  );

js ([OPTION_HASH])

The JAVA script for FCKeditor is returned.

When OPTION_HASH is passed, the configuration is overwrited.

my $javascript= $e->fck->js(
  width => '500px', height => '300px',
  );

SEE ALSO

Egg::Release, Egg::Base, Egg::Plugin::Tools, http://www.fckeditor.net/,

AUTHOR

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.