A comment - FCK Editor

Talk about WYSIWYG changes or implementation of other WYSIWYGs

Moderator: alexandrleonenko

RationalRabbit
Junior
Junior
Posts: 14
Joined: May 6th, '09, 18:55

A comment - FCK Editor

Postby RationalRabbit » May 19th, '09, 03:06

fck editor seems a lot easier to customize and less finicky than openWYSIWYG.
Anyone agree? Disagree?

I think it might be worth considering for a future release.

th0car
Junior
Junior
Posts: 12
Joined: Jun 16th, '09, 10:46

Re: A comment - FCK Editor

Postby th0car » Jun 28th, '09, 08:25

The 1.47 version of WYSIWYG is easier to customize and configure compared to the rather old version that comes with PHPDG 5.0.7. I have tried to upgrade the WYSIWYG module in PHPDG with WYSIWYG 1.47 but this far without success.

I will be using PHPDG for small customized administrative interfaces for websites. For this I need to limit the wysiwyg functionality to allow the user only to apply predefined styles(css) to the text. I'm not sure yet if openWYSIWYG 1.47 could do this for me, but I know that FCK Editor would.

Also openWebWare maintains no forum (or support?) for openWYSIWYG anymore as far as I can see which doesn't have to be a problem, but it's not a good sign either...

So instead of investing time in getting new versions of openwysiwig to run with PHPDG I support a switch to FCK Editor in future releases of PHPDG. This said, of course, without knowing how time consuming a switch like that would be ;)

administrator
Site Admin
Site Admin
Posts: 6073
Joined: Jan 7th, '09, 23:18
Contact:

Re: A comment - FCK Editor

Postby administrator » Jul 4th, '09, 10:21

1. We are planning to implement new version of openWYSIWYG editor.
2. FCK Editor is really nice product, only 1 problem.... it is bigger (in KB) that all PHP DataGrid project :)
So it can not be a "module" anyway..

What would be nice - if someone could try to implement FSK Editor with our help - and I know someone already done this - so we all could enjoy and
post here a full instruction of HOW TO implement FSK with PHP DataGrid

kazak.71
Junior
Junior
Posts: 23
Joined: Jul 22nd, '09, 09:24

Re: A comment - FCK Editor

Postby kazak.71 » Jul 22nd, '09, 10:01

administrator wrote:1. We are planning to implement new version of openWYSIWYG editor.
2. FCK Editor is really nice product, only 1 problem.... it is bigger (in KB) that all PHP DataGrid project :)
So it can not be a "module" anyway..

What would be nice - if someone could try to implement FSK Editor with our help - and I know someone already done this - so we all could enjoy and
post here a full instruction of HOW TO implement FSK with PHP DataGrid


Hi! Thank's for your great work! Yesterday I bought version 5.0.7 of PHP Datagrid and I would like to try implementing FCK Editor. I have implemented it already with version 4.2.8. And it works great! :) Would you help me?

kazak.71
Junior
Junior
Posts: 23
Joined: Jul 22nd, '09, 09:24

Re: A comment - FCK Editor

Postby kazak.71 » Jul 22nd, '09, 22:32

I have implemented it :D

administrator
Site Admin
Site Admin
Posts: 6073
Joined: Jan 7th, '09, 23:18
Contact:

Re: A comment - FCK Editor

Postby administrator » Jul 25th, '09, 13:41

You are the GREAT, man! :)
Would you like to post here instructions for other people how you did it?
How it works? Any problems?

Thanks.

kazak.71
Junior
Junior
Posts: 23
Joined: Jul 22nd, '09, 09:24

Re: A comment - FCK Editor

Postby kazak.71 » Jul 25th, '09, 21:29

administrator wrote:You are the GREAT, man! :)
Would you like to post here instructions for other people how you did it?
How it works? Any problems?

Thanks.


Of course! But next week I am on a business trip and will not be able to write in the forum. If you give me your e-mail, I will send you my "datagrid.class.php". When I back home, I will write instructions in the forum. I have not completely implemented FCKEditor (user have to make manually settings of editor in it's language file), but it's work fine :)

here is working example: http://balans.pazardjik.com/krez/products.php

my e-mail is: kazak.71@citylan.bg

administrator
Site Admin
Site Admin
Posts: 6073
Joined: Jan 7th, '09, 23:18
Contact:

Re: A comment - FCK Editor

Postby administrator » Jul 26th, '09, 16:25

Looks very nice and also works fast.

follower
Senior
Senior
Posts: 27
Joined: Feb 10th, '09, 14:13

Re: A comment - FCK Editor

Postby follower » Jul 31st, '09, 02:34

How about Tiny MCE editor.

I found this to be really nice as well.

kazak.71
Junior
Junior
Posts: 23
Joined: Jul 22nd, '09, 09:24

Re: A comment - FCK Editor

Postby kazak.71 » Aug 10th, '09, 19:58

Sorry I'm late but I was very busy! :(
I have now some time and I post my changes in datagrid.class.php to implement FCKeditor

1. find this line:
if((strtolower($this->browserName) != "netscape") && strtolower($field_edit_type) == "wysiwyg"){

2. comment next lines like this:
// $texarea .= $this->nbsp.$this->ScriptOpen("\n");
// $texarea .= "wysiwygWidth = ".((intval($field_wysiwyg_width) > ((9.4)*$field_cols)) ? intval($field_wysiwyg_width) : ((9.4)*$field_cols)).";";
// $texarea .= "wysiwygHeight = ".(21*$field_rows).";";
// $texarea .= "generate_wysiwyg('".$this->GetFieldRequiredType($field_name).$field_name."'); \n";
// $texarea .= $this->ScriptClose();

3. Add these lines:

$texarea .= $this->nbsp."\n<script type='text/javascript'>\n";
$texarea .= "<!--\n";
$texarea .= "oFCKeditor = new FCKeditor('".$this->GetFieldRequiredType($field_name).$field_name."'); \n";
$texarea .= "oFCKeditor.BasePath = \"".$this->fckeditor_path."\" ; \n";
$texarea .= "oFCKeditor.ReplaceTextarea() ; \n";
$texarea .= "//-->\n";
$texarea .= "</script>\n";


4. We have to load needed javascript so you must make these changes:
// include WYSIWYG script, if needed
if ($this->existingFields['wysiwyg_field']) {
// set WYSIWYG
// echo $this->ScriptOpen("\n");
// echo "imagesDir = '".$this->directory."modules/wysiwyg/icons/';\n"; // Images Directory
// echo "cssDir = '".$this->directory."modules/wysiwyg/styles/';\n"; // CSS Directory
// echo "popupsDir = '".$this->directory."modules/wysiwyg/popups/';\n"; // Popups Directory
// echo $this->ScriptClose();
// echo $this->ScriptOpen("", "src='".$this->directory."modules/wysiwyg/wysiwyg.js'").$this->ScriptClose("");

echo "\n<script type='text/javascript' src='".$this->fckeditor_path."fckeditor.js'></script>";

5. In public declarations you have to add:
// fckeditor directory ---------------------------------------------------------------
public $fckeditor_path;


6. in function __construct (...) you have to add after these rows:
// directory -----------------------------------------------------------
$this->directory = $datagrid_dir;

these rows:

// fckeditor directory ---------------------------------------------------------------
$this->fckeditor_path = $fckeditor_path;


7. In your script you have to initialize path to fckeditor like this:

$fckeditor_path = "tools/fckeditor/" //change to your path but don't miss / at the end of path !


8. That's all! Enjoy your different editor :)


Return to “WYSIWYG changes/implementation”