FCKeditor changes behaviour after upgrade from 1.04 to 1.06

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
macyogi
New Member
New Member
Posts: 9
Joined: Sun Apr 03, 2005 7:10 pm

FCKeditor changes behaviour after upgrade from 1.04 to 1.06

Post by macyogi »

Hi all,
I tried to figure it out by myself, but I failed. So I hope to get an solution from an experienced board member:

As most of you out there I am using smarty tags inside the html-code of the content area. Usually, if these tags will not generate in-line html-output (e.g. modules),  I prefer to put the smarty-tags on a single line in the html-source. After upgrading to version 1.0.6 from 1.0.4 the behaviour of the fckeditor changes in the way that by switching from WYSIWYG to source view the single-line smarty becomes enclosed by paragraph tags:

Code: Select all

{smartytag}


will be converted to

Code: Select all

<p>{smartytag}</p>
Does someone knows how to change the configuration to keep such lines unchanged?

Thanks
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: FCKeditor changes behaviour after upgrade from 1.04 to 1.06

Post by Dee »

in FCKEditor/fckconfig.js (line 115) change

Code: Select all

FCKConfig.EnterMode = 'p' ;
to

Code: Select all

FCKConfig.EnterMode = 'br' ;
or
add a line containing

Code: Select all

FCKConfig.EnterMode = 'br' ;
to FCKeditorXcfg.js.php (somewhere at the end, among the other FCKConfig. lines).

Make sure to clear your browser's cache.

Solution found here.

Regards,
D
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: FCKeditor changes behaviour after upgrade from 1.04 to 1.06

Post by Dee »

If you make this change you'll probably want to completely change the default behaviour around, so also change (on line 116 of FCKEditor/fckconfig.js):

Code: Select all

FCKConfig.ShiftEnterMode = 'br' ;
to

Code: Select all

FCKConfig.ShiftEnterMode = 'p' ;
or

also add a line to FCKeditorXcfg.js.php containing:

Code: Select all

FCKConfig.ShiftEnterMode = 'p' ;
Regards,
D
macyogi
New Member
New Member
Posts: 9
Joined: Sun Apr 03, 2005 7:10 pm

Re: FCKeditor changes behaviour after upgrade from 1.04 to 1.06

Post by macyogi »

Hi Dee,
thanks for your good advise. It truly solves the problem by solving the symtom. I added your solution to my sites!

But I am just wondering what had happend to the FCKeditor. Your solution mentioned above changes the bahaviour of the editor while editing text by entering return or shift-return. This leads to the behaviour that every new paragraph added is a non formated one (not tagged by p).

It also solves the problem that occures by switching from WYSIWYG view to source view as mentioned above. But something must have been changed that only affects the switch.

regards,
macyogi
Caspar

[SOLVED]Re: FCKeditor changes behaviour after upgrade from 1.04 to 1.06

Post by Caspar »

@Dee:
that has been very useful, thanks a lot! Still FCK adds an

Code: Select all

 
in some places where it shouldn't.

I also checked http://sourceforge.net/forum/forum.php?thread_id=1708045&forum_id=257180 and came across http://sourceforge.net/forum/forum.php?thread_id=1719163&forum_id=257180. They provide a patch there, but I haven't found the particular file in my FCK-Module dir.

Do you know more?
Would you have a look here: http://forum.cmsmadesimple.org/index.php/topic,11868.0.html?

Thanks so much!
Caspar

EDIT: Switched to TinyMCE. All fine!
Last edited by Caspar on Fri May 04, 2007 5:53 pm, edited 1 time in total.
User avatar
mesaverde
Forum Members
Forum Members
Posts: 15
Joined: Sat Apr 07, 2007 3:20 pm
Location: Colorado, USA

Re: FCKeditor changes behaviour after upgrade from 1.04 to 1.06

Post by mesaverde »

I had been wondering for awhile now how to change fckeditor's behavior when inserting smarty tags, links, images, etc. until I came across this thread.

It is a great and simple solution. I made the changes to switch enter behavior to "br" and shift-enter to "p" and it works great. Plus some of my users are less confused too.

Thanks
Post Reply

Return to “Modules/Add-Ons”