Replace FCKEditor with TinyMCE

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
shiny
Posts: 56
Joined: Tue 27. Sep 2005, 20:10

Replace FCKEditor with TinyMCE

Post by shiny »

Here's my solution to this problem.

I've uploaded a new wysiwyg.editor.inc here which will replace FCKEditor with TinyMCE as the Option 2 WYSIWYG editor.

Please note: The version of TinyMCE integrated is the default one, and does not have an Image or File Manager. I will change this in future.

Make sure you back up your wysiwyg.editor.inc first in case of any problems.

You'll need to also download TinyMCE from moxiecode.com and put it in the folder /include/inc_ext/tinymce .

I know that zBurner has a solution as well, as mentioned in this thread so maybe he'll post his here too :)
shiny
Posts: 56
Joined: Tue 27. Sep 2005, 20:10

Added iManager support

Post by shiny »

Hello again all :)

It's a bit sad replying to my own thread, I know, but I thought that I'd let you all know that I've managed to integrate TinyMCE with the iManager plugin [image browser/upload/resize/watermarking tools etc.] into Phpwcms now.

Would anyone be interested if I wrote out a little guide [plus a pre-configured TinyMCE editor] so that other people could do it easily?
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

of course we will :)
we wait for both guide and demo :D
Completeness is reached through subtraction, not through addition
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

Hi Shiny,

fine i loaded tinymce and wysiwyg-file and set in config on "2", but still get only html formatted in editors place...

any more hints?

followed your decription on your website..

Usinf only Firefox.

EDITED: i got it need to move the files inside folders.

First impression: nice but much less features as FCKW :-)
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
shiny
Posts: 56
Joined: Tue 27. Sep 2005, 20:10

Post by shiny »

cyrano wrote:EDITED: i got it need to move the files inside folders.

First impression: nice but much less features as FCKW :-)
That's probably because you're using the custom configuration that I use, which is the default one that I give clients when I put TinyMCE in sites for them, which has quite a few of the features disabled.

That's my fault, I should really have enabled a few more of the buttons. I'll look into it for a future [i.e. the next] version of my guide.

For a rather extreme full-featured example of TinyMCE, visit http://tinymce.moxiecode.com/example_fu ... ample=true for rather more plugins than you can shake a stick at!
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

hi shiny,

thanx for your reply - i wondered because i have seen much more features.

ok i will dig it out and will set more functions to go :-)
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
squidi
Posts: 143
Joined: Sat 17. Jan 2004, 13:49
Location: Berlin

Post by squidi »

hi,
sorry shiny aber dieser code zum einbinden des editors ist nicht richtig. jetzt habe ich den editor in allen textfeldern - schlüsselwörter, schlagtext und bildunterzeile :roll:

sorry shiny but this code is not correct for include the editor. i have now the editor in all textareas - keywords, summary and caption :roll:

squidi
shiny
Posts: 56
Joined: Tue 27. Sep 2005, 20:10

Post by shiny »

squidi wrote:hi,
sorry shiny aber dieser code zum einbinden des editors ist nicht richtig. jetzt habe ich den editor in allen textfeldern - schlüsselwörter, schlagtext und bildunterzeile :roll:

sorry shiny but this code is not correct for include the editor. i have now the editor in all textareas - keywords, summary and caption :roll:

squidi
Yes, you're right. I've got it in the wrong mode. I shall fix this in the next release of my code, too. Sorry about that - hope you backed up your wysiwyg.editor.inc! :?
squidi
Posts: 143
Joined: Sat 17. Jan 2004, 13:49
Location: Berlin

Post by squidi »

shiny wrote:... hope you backed up your wysiwyg.editor.inc! :?
Yes i did it and i have include the imanager without problems, but no absolut path for picture - not good for newsletter :(

squidi
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

squidi wrote:
shiny wrote:... hope you backed up your wysiwyg.editor.inc! :?
Yes i did it and i have include the imanager without problems, but no absolut path for picture - not good for newsletter :(

squidi
Im sure you can edit that somewhere.....
http://www.studmed.dk Portal for doctors and medical students in Denmark
shiny
Posts: 56
Joined: Tue 27. Sep 2005, 20:10

Post by shiny »

frold wrote:
squidi wrote:
shiny wrote:... hope you backed up your wysiwyg.editor.inc! :?
Yes i did it and i have include the imanager without problems, but no absolut path for picture - not good for newsletter :(

squidi
Im sure you can edit that somewhere.....
You certainly can.

If you open your wysiwyg.inc.php and insert the line

Code: Select all

relative_urls : false
within the

Code: Select all

tinyMCE.init({ ... });

that should sort you out.

Remember to include a comma if necessary at the end of the line so that it parses correctly. :)
squidi
Posts: 143
Joined: Sat 17. Jan 2004, 13:49
Location: Berlin

Post by squidi »

squidi wrote:hi,
sorry shiny aber dieser code zum einbinden des editors ist nicht richtig. jetzt habe ich den editor in allen textfeldern - schlüsselwörter, schlagtext und bildunterzeile :roll:

sorry shiny but this code is not correct for include the editor. i have now the editor in all textareas - keywords, summary and caption :roll:

squidi
hi shiny , i have fixed it so ... and it works fine , but i have only test it at the moment with the theme = simple , tomorrow i will edit the theme = advanced for more options and include the imanager :shock:

edit the case 2 in wysiwyg.editor.inc.php

Code: Select all

	     // load TinyMCE, not FCKEditor
	case 2:

if(!isset($wysiwyg_loaded_FCKeditor) || !$wysiwyg_loaded_FCKeditor) { 
    echo "<script language="javascript" type="text/javascript" src='/include/inc_ext/tiny_mce/tiny_mce.js'></script>";
   }
	?>

<script language="javascript" type="text/javascript">
	tinyMCE.init({
		mode : "exact",
            elements : "<?php echo $wysiwyg_editor['field']?>",
		theme : "simple"
	});
</script>

<textarea id='<?php echo $wysiwyg_editor['field']?>' name='<?php echo $wysiwyg_editor['field'] ?>' style='height: <?php echo $wysiwyg_editor['width'] ?>; width: <?php echo $wysiwyg_editor['width'] ?>'>
<?php echo html_specialchars($wysiwyg_editor['value']); ?>
</textarea>

     <?php 
			$wysiwyg_loaded_tinyMCE = 1;
			break;
squidi
Monz@
Posts: 34
Joined: Fri 18. Feb 2005, 17:10
Location: Balzers / Liechtenstein
Contact:

Post by Monz@ »

hi @ all

shiny writes so beautiful to sit back and have a cup of tea (english people... and this now also after 11pm *g*). For me I have to say I need a strong cup of double espresso!

All what I'm doing I'm not getting the goal. The only thing I get with this description is a "pure html" area to write in! And with the description of zBurner there are only Failure Messages (IE) or just nothing (FF).

Who can help me solve this miracle??? :roll:

cheers
Buletti
Posts: 43
Joined: Tue 27. Sep 2005, 10:51
Location: Hamburg / Berlin / Germany

Post by Buletti »

Maybe you look at

http://www.phpwcms.de/forum/viewtopic.p ... highlight=

It works, but stillsome bugs

@Monz@: Haha, that's funny... We posted same things in different themes.
Monz@
Posts: 34
Joined: Fri 18. Feb 2005, 17:10
Location: Balzers / Liechtenstein
Contact:

Post by Monz@ »

hi buletti

i've been trying this yesterday for hours... only "failure on site" messages in IE and in Firefox happend nothing...

Is there maybe a wrong relative path somewhere? my cms installation is @ 'www.domain.com/cms/' ?

====> SOLVED <=====

Failure in 'wysiwyg.editor.inc.php' - mea culpa - mea maxima culpa :oops:

Anyway thanx for answers

cheers
Post Reply