For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > August 2007 > PMWiki with FCKEditor









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PMWiki with FCKEditor
Rolly

2007-08-30, 7:31 pm

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

salmobytes

2007-08-30, 7:31 pm

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() ;


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com