PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Sergey Romanov   HTML Editor   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: HTML Editor
Compose and output HTML documents
Author: By
Last change: added new function example
Date: 19 years ago
Size: 1,284 bytes


Class file image Download

$editor = new Html_Editor;

$doc1 = $editor->newDocument('This is the title');

$editor->linkCss($doc1, '../main.css');

$meta = array(
'author' => 'Sergey Romanov',
'generator' => 'HTML-Kit'
$meta_http = array(
'content-type' => 'text/html; charset=windows-1251'
$editor->addMeta($doc1, $meta);
$editor->addMetaHttp($doc1, $meta_http);
$css = new CSS_Editor;
$h1 = $css->setElement('h1');
$property = array(
'color' => 'red',
'text-decoration' => 'underline'

$css = $editor->getHtml('style', $css->getCss());

$editor->addHeadAdditions($doc1, $css);

$ba = array(
'margintop' => '0',
'marginwidth' => '0'

$editor->writeHtml($doc1, 'h1','Hello World');
$text = 'This is an example text';
$text = $editor->highlightText('B class="test"',' is ',$text);
$text = $editor->highlightText('i',' example ',$text);
$array = array('test it', 'once more', 'three to complete');
$array As $k => $v){
$list .= $editor->getHtml('li',$v);
$editor->writeHtml($doc1, 'ul',$list);