Do you have a question? Post it now! No Registration Necessary. Now with pictures!
August 30, 2007, 3:20 pm
rate this thread
I need help to integrate FCKEditor (www.fckeditor.net) into the PMWiki
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.
Re: PMWiki with FCKEditor
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
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];