Page 1 of 2

Replace FCKEditor with TinyMCE

Posted: Mon 3. Oct 2005, 12:37
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 :)

Added iManager support

Posted: Thu 6. Oct 2005, 16:20
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?

Posted: Thu 6. Oct 2005, 16:42
by Fulvio Romanin
of course we will :)
we wait for both guide and demo :D

Posted: Thu 6. Oct 2005, 17:30
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 :-)

Posted: Thu 6. Oct 2005, 20:48
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!

Posted: Thu 6. Oct 2005, 21:31
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 :-)

Posted: Fri 7. Oct 2005, 12:33
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

Posted: Fri 7. Oct 2005, 13:57
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! :?

Posted: Fri 7. Oct 2005, 14:52
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

Posted: Fri 7. Oct 2005, 14:58
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.....

Posted: Mon 10. Oct 2005, 16:55
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. :)

Posted: Thu 13. Oct 2005, 01:16
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

Posted: Fri 25. Nov 2005, 10:12
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

Posted: Fri 25. Nov 2005, 10:16
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.

Posted: Fri 25. Nov 2005, 10:19
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