|
Posted by salmobytes on 08/30/07 15:44
On Aug 30, 9:20 am, Rolly <rolly.fing...@gmx.de> wrote:
> Hi,
> I need help to integrate FCKEditor (www.fckeditor.net) into the PMWiki
> (http://www.pmwiki.org/).
> I found some manuals (e.g. (http://www.pmwiki.org/wiki/Cookbook/
> FCKEditor), but some are not
> beneficial and some other are in french.
>
> And I know the discussion about WYSIWYG editor with wikis, anyway I
> need this integration.
>
> Thx
> bye
> rolly
I use fckeditor for my little CMS and like it a lot.
The fckeditor documentation seems to dodge the issue of
editing and changing existing files. There would
be numerous security pitfalls to deal in a wiki
context.
I allow the editing of existing files only behind a password
protected barrier, so I make a trust assumption that way.
What the fck documentation seems to overlook is
the $this-Value trick.
fckeditor has a class variable called var $Value that holds
the actual html for the current page.
So, to edit an existing file, you need to instantiate an editor:
$editor = new FCKeditor('Stuff') ;
$editor->Value = ""; //probably redundant
$editor->BasePath = "something";
$file = $_GET['file'];
$filelines = file($file);
$cnt = count($filelines);
for($i=0; $i<$cnt; $i++)
{
$editor->Value .= $filelines[$i];
}
$editor->Create() ;
Navigation:
[Reply to this message]
|