• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: TinyMCE <p> <br />
PostPosted: Tue Jul 03, 2012 1:50 pm 
Offline
Forum Members
Forum Members

Joined: Thu Sep 25, 2008 5:02 pm
Posts: 153
Upgraded to the latest TinyMCE module version this morning.
Return now gives a <br /> line-break
and Shift+Return gives me a <p> new paragraph
The norm in typesetting, text editors, word processors, dtp programs etc. for over 30 years has been the opposite.
Is there any way I can change this back to the norm?
gruss - spike


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Tue Jul 03, 2012 3:20 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7690
Location: The Netherlands
We noticed this too. As far as I know, this behaviour is changed in core TinyMCE. Don't know if we can change anything. Silmarilion is looking in it.

Grtz. Rolf

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Tue Jul 03, 2012 3:49 pm 
Offline
Forum Members
Forum Members

Joined: Thu Sep 25, 2008 5:02 pm
Posts: 153
Hi Rolf,

In the meatime - I downloaded the latest core TinyMCE and installed it on one of my sandbox domains, works perfectly. Unfortunately I'm not a programmer but something appears to have got "back to front".

thanks for your post - my best regards - gruss - spike


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Wed Jul 04, 2012 1:15 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Sat Apr 18, 2009 10:09 pm
Posts: 1425
Location: Maidenhead, UK
spike wrote:
something appears to have got "back to front".

Hi spike, it appears to be a deliberate change by the guys over at TinyMCE. See the link on post 3 of this similar thread:
viewtopic.php?f=79&t=61728


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Wed Jul 04, 2012 3:03 pm 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 610
Hi!

I don't get it. They don't say WHY they changed it. EVERY word processor software I know inserts a P when you hit ENTER and a BR when you hit SHIFT-ENTER. Only in TinyMCE it will be the other way 'round. So this is going to confuse our users :-(

But: "So just set forced_root_block to false and it will start spitting out those pesky BR elements."

Doesn't that mean that this is disabled by default?

Cheers,
Alex


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Thu Jul 05, 2012 8:04 am 
Offline
Forum Members
Forum Members

Joined: Thu Sep 25, 2008 5:02 pm
Posts: 153
I don't get it either, these are standard keyboard commands and have been for the last four decades as far as I can remember. They're not only standard across the various software programs but also work across different platforms. Let's hope they see the folly of their ways. There must be literally billions of people who use these commands unconsciously, it's certainly been very irritating these last couple of days when switching from any other program to Tiny and having to consciously think backwards.
A very foolish move on Tiny's part methinks.
grumble grumble . . .
gruss - spike


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Thu Jul 05, 2012 4:26 pm 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 610
http://forum.cmsmadesimple.org/viewtopic.php?f=79&t=61728&p=281918#p281918

Thread is locked, we are told to discuss here. So, here goes:

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 English, 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).

I am no smarty expert, but couldn't we write a prefilter.freeTag.php which disposes the surrounding P elements from the { tag }?

Cheers,
Alex


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Thu Jul 05, 2012 5:31 pm 
Offline
Forum Members
Forum Members

Joined: Thu Sep 25, 2008 5:02 pm
Posts: 153
This appears to fix it for me -
if you want <p> for return (Carriage Return) and <br /> for shift+return (Soft Return)
put following in advanced extra config window
forced_root_block:true

don't forget the commas if you've got anything else in that window

gruss - spike


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Thu Jul 05, 2012 5:45 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8159
Location: Fernie British Columbia, Canada
Quote:
But there is still the problem with P surrounding module calls (which is not new problem, I admit).


And there is absolutely no way to fix this.

a: tinymce doesn't know anything about smarty.
b: a call to {mymodule arg1=foo arg2=bar} may produce block code, or inline text there is no way that tinymce can know this. infact, even smarty doesn't know what it will produce it just calls some php code that generates some output.

solution: If all you are doing is calling a module from within a content block, then you should be disabling the wysiwyg for that block and/or page.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Fri Jul 06, 2012 10:43 am 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 610
calguy1000 wrote:
Quote:
But there is still the problem with P surrounding module calls (which is not new problem, I admit).


And there is absolutely no way to fix this.

a: tinymce doesn't know anything about smarty.


ok, but the prefilter.anchorreplace.php works perfectly ...

calguy1000 wrote:
b: a call to {mymodule arg1=foo arg2=bar} may produce block code, or inline text there is no way that tinymce can know this. infact, even smarty doesn't know what it will produce it just calls some php code that generates some output.


This seems to be a minor problem. All modules I have used so far produce block output. And if a plugin produces inline output it is usually not called with an etra line.

calguy1000 wrote:
solution: If all you are doing is calling a module from within a content block, then you should be disabling the wysiwyg for that block and/or page.


I simply cannot tell my users that they have to learn HTML for the simple task of inserting a youtube video or a GoogleMap.

I wrote a litte filter which I still have to test, so far it seems to work:

prefilter.freetag.php

Code:
<?php
function smarty_cms_prefilter_freetag($tpl_source, &$smarty)
{
return preg_replace('/<p>(\{[A-Za-z0-9\\._-]+\})<\/p>/', "$1", $tpl_source);
}
?>


Do you see any problems with this?

Cheers,
Alex


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Fri Jul 06, 2012 1:29 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8159
Location: Fernie British Columbia, Canada
Quote:
Do you see any problems with this?


Yep, tonnes... but I'll let you flail around for a few days before you find out it's problematic.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Fri Jul 06, 2012 2:21 pm 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 610
calguy1000 wrote:
Quote:
Do you see any problems with this?


Yep, tonnes... but I'll let you flail around for a few days before you find out it's problematic.


Thank you very much for sharing your insight.

Regards,
Alex


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Sun Jul 29, 2012 9:25 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Dec 01, 2009 3:42 pm
Posts: 98
Location: Alsace // France
Hi guys,

See the new 3.5.6 version of TinyMCE: http://www.tinymce.com/develop/changelog/?type=tinymce

It seems that they have corrected the problem :
"Fixed so force_p_newlines option works again since some users want mixed mode paragraphs."

I'm just doing some tests, and adding :
force_br_newlines : false,
force_p_newlines : true,

To the config of the TinyMCE module seems to work!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Tue Jul 31, 2012 2:46 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Feb 08, 2007 6:11 pm
Posts: 506
Location: Florida
For videos I created a UDT:

Code:
/*
Elastic YouTube iFrame for use with responsive css
Parameter: url
Reference: http://webdesignerwall.com/demo/elastic-videos/
*/
echo '<div class="video-wrapper clearfix">';
echo '<div class="video-container">';
echo '<__iframe width="800" height="510"';
echo ' src="'.$params['url'].'"';
echo '></__iframe></div>';
if ($params['caption']) {
echo '<p>';
echo ''.$params['caption'].'';
echo '</p>';
}
echo '</div>';


Then in the TinyMCE in the advanced Custom drop down:

Code:
---|---
Insert Youtube iframe |{*do not put between p tags*}{elastic_youtube_iframe url=" "}
---|---


Then I gave customers a PDF with screen shots on how to do and turn off the editor to drag the code outside the paragraph. This is combined with the elastic videos css, works great on content pages, but for the blog or news, unless their adding multiple videos to these pages, then I put just a input field for the id and it grabs the youtube thumb or vimeo thumb for the summary and the video for the post, I have some info in the tips and tricks section.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: TinyMCE <p> <br />
PostPosted: Tue Jul 31, 2012 9:47 am 
Offline
Power Poster
Power Poster

Joined: Fri Mar 03, 2006 1:32 pm
Posts: 610
carasmo wrote:
Then I gave customers a PDF with screen shots on how to do and turn off the editor to drag the code outside the paragraph.


But they will have to do this *every time* they re-edit the page.

And it is no solution for all other module/plgin/udt calls.

BTW, I am still looking for the "tonnes of problems". Maybe CG could give at least a hint ...

Cheers,
Alex


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting