Re: HTML QuickForm elments for HTMLArea (xinha), FCKeditor and jscalendar
| From: | spacecharly | Date: | Tue, 10 Feb 2009 21:11:25 +0000 |
| Subject: | Re: HTML QuickForm elments for HTMLArea (xinha), FCKeditor and jscalendar | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29688@lists.php.net to get a copy of this message | ||
Hello,
I updated the scripts for the use of the new Xinha editor, formerly
HTMLarea.
Download it here: http://trac.xinha.org/
Here is the new htmlarea.php file:
http://www.nabble.com/file/p21942579/htmlarea.php
htmlarea.php
And two usage examples:
#### Only one editor ####
[...]
require_once 'HTML/QuickForm/htmlarea.php';
$options = array('url' => './Xinha_0.96beta/', 'lang' =>
'de'); // I used
last 'beta' version
$options['config']['statusBar'] = false;
$form->addElement('htmlarea', 'description', 'Description:',
$options,
null);
$htmlarea = &$form->getElement('description');
$htmlarea->registerPlugin('ContextMenu');
$htmlarea->registerPlugin('TableOperations');
$htmlarea->setRows(8); // I added this method.. !!!NEW!!!
$htmlarea->setCols(30); // ..and this method too. !!!NEW!!!
[...]
#### Two editors on the same form ####
[...]
require_once 'HTML/QuickForm/htmlarea.php';
$attributes['editors_names'] = "description::description2"; // !!!NEW!!!
$options = array('url' => './Xinha_0.96beta/', 'lang' =>
'de');
$options['config']['statusBar'] = false;
$form->addElement('htmlarea', 'description', 'Description:',
$options,
$attributes);
$htmlarea = &$form->getElement('description');
$htmlarea->registerPlugin('ContextMenu');
$htmlarea->registerPlugin('TableOperations');
$htmlarea->setRows(8);
$htmlarea->setCols(30);
// When we added the first htmlarea, the necessary javascript
// has already been included, we don't need to add it now:
$attributes['no_more_include_js'] = true; // !!!NEW!!!
$form->addElement('htmlarea', 'description2', 'Description2:',
$options,
$attributes);
$htmlarea2 = &$form->getElement('description2');
$htmlarea2->registerPlugin('ContextMenu');
$htmlarea2->registerPlugin('TableOperations');
$htmlarea2->setRows(8); // !!!NEW!!!
$htmlarea2->setCols(30); // !!!NEW!!!
[...]
[greetings and small talk removed]
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
View this message in context: http://www.nabble.com/HTML-QuickForm-elments-for-HTMLArea-%28xinha%29%2C-FCKeditor-and-jscalendar-tp4523180p21942579.html
Sent from the Pear - General mailing list archive at Nabble.com.