<?php

require_once('HTML/QuickForm.php');

$form = new HTML_QuickForm();
$form->registerElementType('htmlarea', 'HTML/QuickForm/htmlarea.php', 'HTML_QuickForm_htmlarea');

$options = array('url' => './htmlarea/', 'lang' => 'de');
$attributes = array('rows' => 25, 'cols' => 80);
$config = array('width' => '580px', 'height' => '400px');
$form->addElement('htmlarea', 'text', 'HTMLArea', $options, $attributes);
$form->addElement('submit', '__submit__', 'Testing');

$htmlarea = &$form->getElement('text');
$htmlarea->setURL('./htmlarea');
$htmlarea->setLang('de');
$htmlarea->setConfig($config);
$htmlarea->setConfig('statusBar', false);

$js  = "function help (editor, id) {";
$js .= "window.open('help.html', 'help');";
$js .= "}";  
$htmlarea->registerButton('help', 'Help', 'htmlarea/images/ed_help.gif', false, $js);
$htmlarea->pushButton('help');
//$htmlarea->setToolbar(array('bold', 'italic', 'insertimage', 'space', 'help'));

$css_options = array('combos' => array(array('label' => 'Test1',
                                             'options' => array ('none' => '',
                                                                 'code' => 'code'),
                                             'context' => 'pre'),
                                       array('label' => 'Test2',
                                             'options' => array ('none' => '',
                                                                 'code' => 'code'),
                                             'context' => 'p')
                                       )
                     );
$htmlarea->registerPlugin('TableOperations');
$htmlarea->registerPlugin('CSS', $css_options);
$htmlarea->registerPlugin('ContextMenu');

print $form->toHtml();

?>