Page 1 of 2

[fixed] MicroTiny p vs br

Posted: Wed Jun 27, 2012 10:13 am
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?

Re: MicroTiny p vs br (discussion)

Posted: Wed Jun 27, 2012 11:22 am
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?

Re: MicroTiny p vs br (discussion)

Posted: Wed Jun 27, 2012 11:29 am
by cb2004
No worries. The main reasoning behind it can be found here:

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

Re: MicroTiny p vs br (discussion)

Posted: Thu Jul 05, 2012 1:40 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 2:13 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 2:14 pm
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.

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 3:47 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 3:52 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 3:53 pm
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.

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 3:57 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 4:02 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 4:08 pm
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.

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 4:12 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 4:16 pm
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

Re: [parked] MicroTiny p vs br

Posted: Thu Jul 05, 2012 4:31 pm
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