CMS Made Simple Forums
https://forum.cmsmadesimple.org/

[fixed] MicroTiny p vs br
https://forum.cmsmadesimple.org/viewtopic.php?f=80&t=61728
Page 1 of 2

Author:  cb2004 [ Wed Jun 27, 2012 10:13 am ]
Post subject:  [fixed] MicroTiny p vs br

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?

Author:  Silmarillion [ Wed Jun 27, 2012 11:22 am ]
Post subject:  Re: MicroTiny p vs br (discussion)

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?

Author:  cb2004 [ Wed Jun 27, 2012 11:29 am ]
Post subject:  Re: MicroTiny p vs br (discussion)

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

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

Author:  faglork [ Thu Jul 05, 2012 1:40 pm ]
Post subject:  Re: MicroTiny p vs br (discussion)

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

Author:  uniqu3 [ Thu Jul 05, 2012 2:13 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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

Author:  uniqu3 [ Thu Jul 05, 2012 2:14 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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.

Author:  faglork [ Thu Jul 05, 2012 3:47 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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

Author:  faglork [ Thu Jul 05, 2012 3:52 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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

Author:  uniqu3 [ Thu Jul 05, 2012 3:53 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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.

Author:  faglork [ Thu Jul 05, 2012 3:57 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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

Author:  uniqu3 [ Thu Jul 05, 2012 4:02 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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

Author:  cb2004 [ Thu Jul 05, 2012 4:08 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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.

Author:  faglork [ Thu Jul 05, 2012 4:12 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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

Author:  faglork [ Thu Jul 05, 2012 4:16 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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

Author:  Rolf [ Thu Jul 05, 2012 4:31 pm ]
Post subject:  Re: [parked] MicroTiny p vs br

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:
force_br_newlines : false,
force_p_newlines : true
Note, this can't be used in MicroTiny!

Hope this helps,

Rolf

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/