PHP Form Builder Class / Examples / Web Editors

Version: 1.1.2Released: October 10, 2010

Web Editors - This project has support for two web editors - TinyMCE and CKEditor. More information about these editors can be found at http://tinymce.moxiecode.com/ and http://ckeditor.com/ respectively. Below, you will find several form/element attributes that affect the behavior of these two html wysiwyg editors.

Below you'll find several ways you can use the addWebEditor and addCKEditor functions in your development.

Processing


Processing

<?php
$form 
= new form("webeditors_0");
$form->setAttributes(array(
    
"width" => 655
));

if(!empty(
$_GET["errormsg_0"]))
    
$form->errorMsg filter_var(stripslashes($_GET["errormsg_0"]), FILTER_SANITIZE_SPECIAL_CHARS);

$form->addHidden("cmd""submit_0");
$form->addWebEditor("TinyMCE Web Editor:""MyWebEditor");
$form->addWebEditor("TinyMCE Web Editor w/Basic Attribute:""MyWebEditorBasic""", array("basic" => 1));
$form->addButton();
$form->render();
?>

<br/><br/>

<?php
$form 
= new form("webeditors_1");
$form->setAttributes(array(
    
"width" => "850"
));

if(!empty(
$_GET["errormsg_1"]))
    
$form->errorMsg filter_var(stripslashes($_GET["errormsg_1"]), FILTER_SANITIZE_SPECIAL_CHARS);

$form->addHidden("cmd""submit_1");
$form->addCKEditor("CKEditor Web Editor:""MyCKEditor");
$form->addCKEditor("CKEditor Web Editor w/Basic Attribute:""MyCKEditorBasic""", array("basic" => 1));
$form->addButton();
$form->render();
?>