[fixed] MicroTiny p vs br

cb2004
Power Poster
Power Poster
Posts: 317
Joined: Wed Jul 04, 2007 3:39 pm

[fixed] MicroTiny p vs br

Post by cb2004 »

With the release of the new TinyMCE 3.5 (MicroTiny uses 3.5.4) they changed the behaviour of the whole <p> vs <br /> debate. If you go to add a new page with the default MicroTiny installed in BETA 2 and hit enter a few times you will be faced with a load of <br /> tags. To produce a <p> you must now press Shift + Return. This is documented here:

http://www.tinymce.com/wiki.php/Configu ... r_newlines

http://www.tinymce.com/wiki.php/Configu ... root_block

I fixed what I think is an issue by changing the line to forced_root_block : 'p', in /modules/MicroTiny/templates/microtinyconfig.tpl.

What are peoples thoughts on this? Is it an issue?
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm
Location: Denmark

Re: MicroTiny p vs br (discussion)

Post by Silmarillion »

Hi cb2004

Thanks for the notice! We will investigate further and discuss how to handle this gracefully!

Stay tuned :)

Silmarillion
cb2004 wrote:With the release of the new TinyMCE 3.5 (MicroTiny uses 3.5.4) they changed the behaviour of the whole <p> vs <br /> debate. If you go to add a new page with the default MicroTiny installed in BETA 2 and hit enter a few times you will be faced with a load of <br /> tags. To produce a <p> you must now press Shift + Return. This is documented here:

http://www.tinymce.com/wiki.php/Configu ... r_newlines

http://www.tinymce.com/wiki.php/Configu ... root_block

I fixed what I think is an issue by changing the line to forced_root_block : 'p', in /modules/MicroTiny/templates/microtinyconfig.tpl.

What are peoples thoughts on this? Is it an issue?
cb2004
Power Poster
Power Poster
Posts: 317
Joined: Wed Jul 04, 2007 3:39 pm

Re: MicroTiny p vs br (discussion)

Post by cb2004 »

No worries. The main reasoning behind it can be found here:

http://www.tinymce.com/forum/viewtopic.php?id=28724
faglork

Re: MicroTiny p vs br (discussion)

Post by faglork »

cb2004 wrote:No worries. The main reasoning behind it can be found here:

http://www.tinymce.com/forum/viewtopic.php?id=28724
I don't see any "reasoning" there.

And it makes no sense at all. EVERY word processer I know inserts a P when you hit ENTER. *Only* TinyMCE will be different.

Just explain this to your customers ...

Not amused,
Alex
uniqu3

Re: [parked] MicroTiny p vs br

Post by uniqu3 »

It is TinyMCE Core feature, why not complain there?

case 1)
If external software isn't updated before CMSMS release people ask why it wasn't updated
case 2)
if it is updated, that external software changed behavior in latest release then again people ask why is it like that
uniqu3

Re: [parked] MicroTiny p vs br

Post by uniqu3 »

cb2004 wrote: I fixed what I think is an issue by changing the line to forced_root_block : 'p', in /modules/MicroTiny/templates/microtinyconfig.tpl.

What are peoples thoughts on this? Is it an issue?
By forcing root block to p you would allways have behavior like:
<p>{mytag}</p> even if you dont want it.
Giving invalid html output.
faglork

Re: [parked] MicroTiny p vs br

Post by faglork »

uniqu3 wrote:
By forcing root block to p you would allways have behavior like:
<p>{mytag}</p> even if you dont want it.
Giving invalid html output.
But this was default behavior in the previous versions. And (AFAIK) NO way to change that, at least not within the TinyMCE admin.
I just confirmed this with cmsms module versions 2.8.4 and 2.9.6.

Cheers,
Alex
Last edited by faglork on Thu Jul 05, 2012 3:53 pm, edited 1 time in total.
faglork

Re: [parked] MicroTiny p vs br

Post by faglork »

uniqu3 wrote: case 1)
If external software isn't updated before CMSMS release people ask why it wasn't updated
case 2)
if it is updated, that external software changed behavior in latest release then again people ask why is it like that
That's because CMSMS uses its own "builds" of the software (at least in this case). So you are never really sure where to complain.

Cheers,
Alex
uniqu3

Re: [parked] MicroTiny p vs br

Post by uniqu3 »

That is correct and many complained, so it was changed in 1.10.3 if i recall right, at least for MicroTiny.
I personally hate the fact when i call a module and have it wrapped in <p> tags and i can not ask client to keep wysiwyyg disabled for that page as it might be only for example a quick news summary module call and regulat content text around it.
faglork

Re: [parked] MicroTiny p vs br

Post by faglork »

uniqu3 wrote: I personally hate the fact when i call a module and have it wrapped in <p> tags and i can not ask client to keep wysiwyyg disabled for that page as it might be only for example a quick news summary module call and regulat content text around it.
Before, you could simply use SHIFT-RETURN to insert a module call.
EDIT: I am talking nonsense here. SHIFT-RETURN spits out BR P, so you still have the call wrapped in P.

Now, you have no way to configure this. remember: ALL word processors (at least all I know of) use ENTER to insert a P and SHIFT-ENTER to insert a BR. So now we have to explain to all of our users that from now on it is different? A huge drawback.

Do you see any workaround to get the "normal word processor behavior" back?

Cheers,
Alex
Last edited by faglork on Thu Jul 05, 2012 4:20 pm, edited 1 time in total.
uniqu3

Re: [parked] MicroTiny p vs br

Post by uniqu3 »

As i already stated few lines above, it was a core change, tinymce core files were as far i recall never modified by dev team.
Unless someone comes with a better idea (we hope for Silmarilion) or cmsms community unites their forces and complains in TinyMCE forum so they revert this behavior back in 3.5.4.2 we can not do anything about it.

PS: Search for topic requesting update of tinymce here in Beta board and lynch the person who posted it :D
cb2004
Power Poster
Power Poster
Posts: 317
Joined: Wed Jul 04, 2007 3:39 pm

Re: [parked] MicroTiny p vs br

Post by cb2004 »

Look for the line:

forced_root_block : '',

In templates/microtinyconfig.tpl and change it to:

forced_root_block : 'p',

This should return to old behaviour. I have done this using the module_custom folder, but maybe this could be added as an option to MicroTiny. Wouldn't take long at all.
faglork

Re: [parked] MicroTiny p vs br

Post by faglork »

uniqu3 wrote: Unless someone comes with a better idea (we hope for Silmarilion) or cmsms community unites their forces and complains in TinyMCE forum so they revert this behavior back in 3.5.4.2 we can not do anything about it.
I am no smarty expert, but couldn't we write a prefilter.freeTag.php which disposes the surrounding P elements from the { tag }?
uniqu3 wrote: PS: Search for topic requesting update of tinymce here in Beta board and lynch the person who posted it :D
:D

Alex
faglork

Re: [parked] MicroTiny p vs br

Post by faglork »

cb2004 wrote:Look for the line:

forced_root_block : '',

In templates/microtinyconfig.tpl and change it to:

forced_root_block : 'p',

This should return to old behaviour. I have done this using the module_custom folder, but maybe this could be added as an option to MicroTiny. Wouldn't take long at all.
Well, in TinyMCE (not microtiny) you can get back the old behavior by setting the option in Advanced Options - don't know what it is called in Englich, in German it is "Absätze erzwingen" which translates to "Force paragraphs".

But there is still the problem with P surrounding module calls (which is not new problem, I admit).

Cheers,
Alex
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [parked] MicroTiny p vs br

Post by Rolf »

In the TinyMCE module you have got a field called "Extra configuration" in the admin tab "Advanced". You can overrule some settings.
You could use here:

Code: Select all

force_br_newlines : false,
force_p_newlines : true
Note, this can't be used in MicroTiny!

Hope this helps,

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Closed Issues”