Yii 1.1: elrte-elfinder

Widget that allows to add elRTE(WYSIWYG editor) + elFinder (file manager for web) to view
28 followers

elRTE is a WYSIWYG HTML-editor written in JavaScript using jQuery UI. It features rich text editing, options for changing its appearance, style and many more.

elFinder is an open-source file manager for web, written in JavaScript using jQuery UI.

Requirements

Client: Modern browser. elFinder was tested in Firefox 3.5+, Internet Explorer 7 & 8, Safari 4, Opera 10 and Chrome

Server: Image preview and thumbnails creation requires: PHP: mogrify utility or GD/Imagick module Widget use jQuery, jQuery UI Tested on Yii 1.1.7 and 1.1.8

Usage

  1. Unpack to folder with your extensions. For example: protected/extensions
  2. Create folder in root directory of your Yii project. Folder name must be content and give this folder write permissions. If you want other name of the folder you can change this in elrte/connectors/php/connector.php :
'root' => $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'/content',  // path to root directory
'URL' => 'content/', // root directory URL
  1. Past this code in to your view file.

Minimum configuration:

$this->widget('application.extensions.elrte.elRTE', array(
    'selector'=>'Page_html_content',
 ));

More configuration options:

$this->widget('application.extensions.elrte.elRTE', array(
    'selector'=>'Page_html_content',
    'doctype' => '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">',
    'cssClass' => 'el-rte',
    'absoluteURLs' => 'false',
    'allowSource' => 'true',
    'lang' => 'ru',
    'styleWithCSS' => 'true',
    'height' => '500',
    'width' => '900',
    'fmAllow' => 'true',
    'toolbar' => 'myToolbar',
 ));

For options description see here

History and bugfix

9 August 2011 - Added possibility to run widget for different text fields(selectors) on one page

Resources

Used elRTE 1.3 + elFinder 1.2

Total 12 comments

#13981 report it
m3mm0 at 2013/07/10 11:43am
Limit the Number of Characters

How to Limit the Number of Characters in elRTE ??

this fails 'htmlOptions' => array('maxlength' => 10),

and 'options' => array('maxlength' => 10 ),

some solution??

#13811 report it
alfredo_90 at 2013/06/27 06:21pm
no me sirven una parte de la barra de herramientas

por que no me abre mis archivos y las fotos tambien, o como le ago xfa

#9684 report it
seb7 at 2012/09/03 08:28am
Good

Thanks for that extension. Works great.

Just a problem a notice, when other widget are included in the page (eg CJuiDatePicker) we get some errors (image button not working for example). So, in elRTE.php i changed

$ClientScript->registerScriptFile("{$this->baseUrl}/js/jquery-ui-1.8.13.custom.min.js");

to

$ClientScript->registerCoreScript('jquery.ui');

then, it seems all right...

#8395 report it
haryanto at 2012/05/31 12:26am
Need Help On Images

I have succesfully install elrte and show the editor. But when i click icon toolbar Image/Flash, it didnt show anything. Firebug show the error on 'this.element.propAttr is not a function' and '
...complete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.pre... jquery-ui.min.js (line 12)'. Anybody can help me???

#8394 report it
haryanto at 2012/05/30 11:42pm
Nice...

@ dominicus : U must put closing tag below the widget

<div id="Page_html_content">
<?php
$this->widget('application.extensions.elrte.elRTE', array(
    'selector'=>'Page_html_content',
    'toolbar'=>'maxi',
));
?>
</div>
#7866 report it
Bernardus at 2012/04/24 02:13am
Not working

It's not working..... no editor at all....

<div id="Page_html_content"></div>
<?php
 
$this->widget('application.extensions.elrte.elRTE', array(
    'selector'=>'Page_html_content',
 ));
 
?>

any solution?

#7223 report it
Sampa at 2012/03/05 02:47pm
elfinder 2.0

You planning to upgrade this widget for use with http://elfinder.org/ 2.0 ? looks even more awesome:)

#7216 report it
Sampa at 2012/03/05 10:18am
Wicked

Fantastic.

#6854 report it
damnated at 2012/02/09 07:02am
@kusanagi

you need to have an empty textarea or div with an id that you give to the widget. In the above example, you should have ie. a

<div id="Page_html_content"></div>

somewhere on the page.

#6203 report it
kusanagi at 2011/12/19 10:45am
not work

it's not work

#4638 report it
micz at 2011/07/28 09:21am
Thanks for it

It would be nice if it would be possible to show elfinder only too.

#4525 report it
bryglen at 2011/07/17 04:26am
nice extension

nice extension :)

Leave a comment

Please to leave your comment.

Create extension