Martes, Enero 27, 2015

How to add a simple WYSIWYG editor (Web text editor)

I've been looking for a free editor and this is the simplest I got. Download fckeditor and place it to your site directory. Include the following to your code:

<?php
include("../fckeditor/fckeditor.php");

$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = 'fckeditor/' ;
$oFCKeditor->Value      = $_POST["respond"] ;
$oFCKeditor->Create() ;
?>

Where $_POST["respond"] is your variable. And that's it.


Hope this helps.

Walang komento:

Mag-post ng isang Komento