FCKEditor-Talk

Summary: Talk page for FCKEditor.
Maintainer:
Users: (View? / Edit?)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

There was a red comment on the main page for quite some time indicating that FCKEditor was really unusable. I see that's been deleted now. Does that mean that this cookbook is in a workable state and is no longer causing the (many) problems that it caused before? —Peter Bowers August 31, 2010, at 06:21 AM

(Jan 25 2006)
Here is an example of a formatting problem that irks me. FCKEditor can take this wiki code:

The current password is billboard - sorry for the inconvenience!

and transform it into:

<p class="vspace"><span style="color: blue;">The current password is</span> <span style="color: red;">billboard</span> - sorry for the inconvenience! </p>

But when I press submit in FCKEditor, the span tags are erased.

Apart from tiny issues, I love this combination. (Please do not close this cookbook.)

JTJohnston

(Jan 22 2006)
FCKeditor is working nicely for me. Please date your updates. PM screws up my table spacing a little and does not recognise the text colour I assign in FCKeditor. otherwise, nothing else to report.
Thanks
-JTJohnston

(Jan 19 2006)
First a very big thank you for this recipe! Its great and exactly what will pull many toward a wiki. I have already set it up and its working well. I just found one small issue with this editor - it does not track simultaneous edits while working on the same page the way the pre-configured text based editor does. It might be a bit tricky but can we atleast have a notification displayed in the edit box somewhere which will show that someone else is trying to modify the page too.
Thanks
-Dey

(December 20, 2006)

1) A fresh install from pmwiki-fckeditor-1.0.tar.gz asks me to over-write 3 or 4 files. I cannot tell which ones though.

2) When I unzip, your directory structure spells /FCKeditor/ as /FCKEditor/. You have to come to a decision on that.

3) I got a "does not exist" error on Dec 19th, this was the URL in the frame: http://www.foo.com/~user/wiki/pub/fckeditor/FCKeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default for this directory structure: /home/user/public_html/wiki/pub/fckeditor/FCKEditor/editor

So to help the siutation, now that I have FCKeditor working, I have created my own zip which works if you follow your installation instructions.

I basically renamed pub/fckeditor/FCKEditor/ to pub/fckeditor/FCKeditor/ and made a few changes in my config.php.

I have even included enough of my local/config.php file to copy and paste from. I would not use it as-is.

You can find it at: http://www.cegepsherbrooke.qc.ca/~languesmodernes/Nouveau%20dossier.zip

John


(December 19, 2006)

cookbook/edit_fckeditor.php needs to be edited. Change <? ... ?> (depreciated) to:

<?php ... ?>

Also, in your config.php file, you need to use this:

include_once("$FarmD/pub/fckeditor/FCKEditor/fckeditor.php");

NOT:

include_once("$FarmD/pub/fckeditor/FCKeditor/fckeditor.php");

Note the upper case in ".../FCKEditor/..."

Problem:

When I click on "Editer en mode visuel" I get "Ce document n'existe pas." I live and work in French. I don't know whether this is PmWiki speaking, or my server.

So far it is not working as distributed and installed. I still have hopes.

At least I have ironed out these two bugs.

John

  • The missing 'php' solved the scrambeld screenview as described below. Strange that a php sytaxchecker didn't pick that up. I figured out the the Capital E earlier in my struggle. Thanks John.

(dec 2 2006) Giving this a try, thanks for the hard work and making it available!!
Hmm, when I include /cookbook/edit_fckeditor.php, I get a screen full of code. Maybe a typo in the file? (nope, checked syntax)
Once included the screen starts with 'HandleEditFck')); SDVA($HandleAuth,array('editfck' => 'edit')); SDVA($PmFCK, etc
With what version of pmwiki has fckeditor been tested please?
Ok, I added the content of the edit_fckeditor.php (without the <? ?>) to config.php before the 2 include lines and fckeditor is working (POC). So let me check what I am doing wrong here...

(mar 11 2008) This turned out to be simply a missing php in the first line of the edit_fckeditor.php. If you are seeing the screen full of code. Edit the edit_fckeditor.php file and change the first line from "<?" to "<?php" (without the quotes). This solved the problem for me. John mentioned this above, but I didn't catch that until I had been through this a few times. I just wanted to make it very explicit.


(03/12/2006) I succesfully set up this cookbook on my PmWiki, and I noticed a lot of problems when saving pages originally created in PmWiki syntax after editing them with FCKEditor. Where can we give you a feedback of the bugs/problems noticed ?
Thanks for the good job done on that cookbook which I think will make a lot of people start having a look at PmWiki.
Ramu.


(30/01/2007) How to set up FCKEditor within pmwiki's farm structure using separate upload directories for each farm.

  • Question: How do I set up FckEditor using the pmwiki farm structure?
    • Answer: Do the following:

1) Install the FckEditor as described above into /pmwiki-latest/pub/fckeditor/.

2) Copy the following code into each /pmwiki-share/farms/farmname/index.php:

/*- FarmName */
// Get farm name from script name (url).
$sScriptName = $_SERVER['SCRIPT_NAME'];
$pregPattern = '/farms\/([a-z0-9]+)\//';
preg_match($pregPattern, $sScriptName, $aMatches);

/*- Save farm name in cookie */
if (isset($_COOKIE['sfarmname']))
{
	$sFarmName = $_COOKIE['sfarmname'];
	//$string = stripslashes($string);
	//$sFarmName = unserialize($string);
	//setcookie('sfarmname','',0,'/');
	if ($sFarmName != $aMatches[1])
	{
		setcookie('sfarmname',$aMatches[1],0,'/');
	}
}
else
{
	setcookie('sfarmname',$aMatches[1],0,'/');
}

/*- pmWiki */
include("$FarmD/pmwiki.php");

3) Copy this into /pmwiki-latest/pub/fckeditor/FCKEditor/editor/filemanager/browser/default/connectors/php/config.php (and into the upload connector's config.php):

// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;
// Set sFarmName and get cookie value for this php script.
$sFarmName = '';
if (isset($_COOKIE['sfarmname']))
{
	$sFarmName = $_COOKIE['sfarmname'];
}

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '';

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = "C:\\Inetpub\\wwwroot\\pmwiki-share\\farms\\".$sFarmName."\\uploads";

4) Then copy this into /pmwiki-latest/pub/fckeditor/FCKEditor/editor/browser/default/frmresourcelist.html which displays the folder(s) and file(s) of your farms separate upload directory:

// Set sFarmName and get cookie value for this javascript.
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length);
	}
	return null;
}

var sFarmName = readCookie('sfarmname');

5) In the same file as in 4) alter the function GetFoldersAndFilesCallBack by modifying the var sFileUrl:

// Get the optional "url" attribute. If not available, build the url.
var oFileUrlAtt = oNodes[i].attributes.getNamedItem('url') ;
var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : sCurrentFolderUrl + sFileName ;
var sFileUrl = 'http://localhost/pmwiki-share/farms/' + sFarmName + '/uploads' + sCurrentFolderPath + sFileName;
oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ;

If you got any questions, please feel free to contact me at geez18 (at) yahoo (dot) com.


(02/02/2007) Today I find out, that the FckEditor has not been fully integrated into PmWiki, e.g. if you create a new page by setting a hyperlink to the non-existent page you want to create, PmWiki creates a hyperlink with a question mark (?) as you know, but it still points to the simple text editor with action=edit instead of using action=editfck. Pragmatically I just changed the links in pmwiki.php, but that's definitly not the elegant way. Anyway to please the wiki user one should add the wikilib.d/Site.EditQuickReference to the editors form, with an advice on how to use the enter key or the shift + enter key and an option to switch back to the simple text editor - some might be scared as they see the FckEditor's way of coding.

(03/02/2007) I wanted the default editing mode to use fckeditor, and I eventually figured it out. Here's how I did it:

I found my skin (I'm using the monobook skin), and replaced all instances of "action=edit" with "action=editfck". Then I edited the page in my wiki called Site.PageActions

I removed the line that said * %item rel=nofollow class=edit accesskey='$[ak_edit]'%[[{$FullName}?action=edit | $[Edit] ]]

and replaced it with two that said:

* %item rel=nofollow class=edit accesskey='$[ak_edit]'%[[{$FullName}?action=editfck | $[Edit] ]]
* %item rel=nofollow class=edit accesskey='$[ak_edit]'%[[{$FullName}?action=edit | $[Edit (Code)] ]]


(5-MAR-2007) To the editor above, please be aware that you have assigned two separate actions to the action key "edit". This is what happens when you press ALT-E (assuming English in a Windows environment). You should have stripped the "accesskey='e' from one or the other of those lines (you choose which one is accessible by the hotkey).

(24-MAR-2007) I get the following err msg when attempting to use FCKeditor: The requested URL /pub/fckeditor/FCKeditor/editor/fckeditor.html was not found on this server.

  • There is a typo in the path. It is not 'fckeditor/FCKeditor' but 'fckeditor/FCKEditor'
    • This typo is still in the code as of 2008-10-10 as this caused me problems too, it's mentioned 2 other times on this page at least

Does anyone have a solution for this?

QUESTION REGARDING LINKS: (1) I can find no way to keep links as I enter them. If I enter a wiki link (relative or absolute) it always gets turned into an http link. If I use the + nomenclature ([[link name|+]] - you can make this happen by typing a "+", selecting it, and then making a link) then it gets replaced with the page title (a good thing) but then if I change the page title later on I no longer have the +...


(24-MAR-2007) Links regularly get mixed up, comments are lost, conditionals are lost, special characters are all changed into their named versions, links are messed up (as in confused - not just as with the question above), etc. This is a tool which MAYBE could be used in a GUI-ONLY environment, but don't even think about it if any pages will be edited in PMWiki markup again. Also, links getting re-assigned to something they weren't before is a show-stopper. --- I had to change some paths in edit_fckeditor.php

SDVA($PmFCK, array(

    'EditFckAction' => 'editfck',
	'Width'  => '100%',
	'Height' => '400',
	'BaseImagePath' => 'http://'.$_SERVER[HTTP_HOST],
	'BasePath' =>'/pmwiki/pub/fckeditor/FCKEditor/',
	'UserFilesPath' => '/pmwiki/uploads/',
	'ToolBar'=> 'PmWiki',
	'EditorAreaCSS' => '/pmwiki/pub/fckeditor/pm_fckstyles.css',
	'StylesXmlPath' => '/pmwiki/pub/fckeditor/pm_fckstyles.xml',
	'CustomConfigurationsPath' => '/pmwiki/pub/fckeditor/pm_fckconfig.js',
	'TextTranslation' => array(summary => 'Summary:', author => 'Author:', minor => 'This is a minor edit', editfck => "WysIsWyg Edit")
	));

For example the typo in Basepath oder the absolute paths in EditorAreaCSS and so on....

regards Tobias H.


CSS formating

I try to use CSS formating for the buttons like save, save&edit, preview and cancel. Therefore I attached css-links like ( :input e_savebutton class=button_editform:) to Site.EditForm. This works fine for the normal editmode but not for the editmode with FCK. I would be happy if you can give me a hint about that. (eMail: baronvonowski [a] gmail.com)

Greetings


(9-APR-2008) This works very well for me. Thanks!


(26-APR-2008) Help! This doesn't work, even after adding PHP, etc. Does anyone have a sample pmwiki install that is downloadable that has FCKeditor working? I'm at mguhlin at gmail.com. Thanks in advance!


(30-APR-2008) I'm still struggling with that Dey reported above (Jan 19 2006) regarding simultaneous edits. Just tested a page with a colleague and my edits overwrote his -- neither of us received that default notice you see when in the regular editor ("The page you are editing has been modified since you started editing it..."). I realize that replicating that exact message in the visual editor environment might be tricky, but is there any other way to note that someone else is editing the page in the visual editor environment? This is pretty make-or-break for the wikis I admin (used with large classes, therefore there's a high likelihood of simultaneous edits!).

Thanks a bunch, amanda (etchesa AT mcmaster DOT ca).


im having problems uploading images in fckeditor, i can upload and see the image but when i click on save, the image is replace by the link of the image any ideas on this?

thanks

Dani


The links are broken. Anyone can give new links please ?

Valinor


Hello

image solution:

for using the upload and image functions you can change the following lines in "edit_fckeditor.php".

i have created a var called $wikiImageTag, which replaces the attach directive against the relative path directive.

/*wikiImageTag = "Attach:Image Δ.";*/ /* old string value*/

$wikiImageTag = "Path:";

$wikisrc = (substr($listattr['src'],0,7)=='http://') ? $listattr['src']:$wikiImageTag.str_replace($PmFCK['UserFilesPath'],"",$listattr['src']);

$wikisrc = (substr($wikisrc,0,strlen($PmFCK['BaseImagePath'].$PmFCK['UserFilesPath']))!=$PmFCK['BaseImagePath'].$PmFCK['UserFilesPath']) ? $wikisrc:$wikiImageTag.str_replace($PmFCK['BaseImagePath'].$PmFCK['UserFilesPath'],"",$wikisrc);

the following line allows using the align dropdown list in imageeditor: 'img' => array( 'type' => 'block', 'autorizedparam' => array('width', 'height', 'border', 'vspace', 'hspace', 'align'))

bye

Florian


29/08/2010 : I have updated the download links.

JLP


Dranakan 30/08/2010 : Thank you for the updated. I have tried to enable (copy files, update the config.php) but I get "Warning: Cannot modify header information - headers already sent by (output started at D:\Actiwiki\myWiki\cookbook\edit_fckeditor.php:479) in D:\Actiwiki\myWiki\pmwiki.php on line 1079). Do you know where is the problem ? Thanks

Talk page for the FCKEditor recipe (users?).