dovresti fare così...
Codice PHP:
<?
/*
* FCKeditor - The text editor for Internet - [url]http://www.fckeditor.net[/url]
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* [url]http://www.gnu.org/licenses/gpl.html[/url]
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* [url]http://www.gnu.org/licenses/lgpl.html[/url]
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* [url]http://www.mozilla.org/MPL/MPL-1.1.html[/url]
*
* == END LICENSE ==
*
* Sample page.
*/
include("fckeditor/fckeditor.php") ;
?>
poi questo per creare la textarea...
Codice PHP:
<?php
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
//$oFCKeditor->BasePath = 'fckeditor/' ; // '/fckeditor/' is the default value.
//$sBasePath = $_SERVER['PHP_SELF'] ;
//$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
$oFCKeditor = new FCKeditor('MyTextArea') ; //questo in effetti crea la textarea..
$oFCKeditor->ToolbarSet = "Basic"; // questo cambia la barra degli strumenti.. puoi anche usare advanced per usalri tutti..
//$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Value = "qua ci metti il valore di default, nel caso di una variabile evita le virgolette..";
$oFCKeditor->Create() ;
?>