Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vinay Yadav  >  of_htmlarea  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: of_htmlarea
Cross-Browser WYSIWYG Editor
Author: By
Last change:
Date: 11 years ago
Size: 997 bytes
 

Contents

Class file image Download
<?php
 
/**
 * Demo script to show the usage of of_htmlarea
 */

 
include("of_htmlarea.inc");

 
$f = new form;

 
$f->add_element(array("type"=>"htmlarea",
                        
"name"=>"content",
                        
"width"=>"100%",
                        
"value"=>"This is the default content",
                        
"initOnLoad"=>true,   // plays a lot of trick
                        
"path"=>"http://www.sanisoft.com/ofhtmlarea/htmlarea"));

 
/**
 * Example Usage
 */
 
echo '<body onload="initEditor();">
        <form action="test.cgi" method="post">'
;
 echo 
$f->ge('content');
 echo 
"</form></body></html>";


 
/* 
  Example Use  with no onload in body
  (initEditor is removed from onload event of body.)

  Set initOnLoad to false ( or simply remvoe the line containing iniOnLoad)

  This code matters only on mozilla - On IE both code work fine.
 */
 /*
 echo '<body>
        <form action="test.cgi" method="post">';
 echo $f->ge('content');
 echo "</form></body></html>";
 */
?>