TinyMCE <p> <br />
TinyMCE <p> <br />
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
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
Re: TinyMCE <p> <br />
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
Grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: TinyMCE <p> <br />
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
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
- paulbaker
- Dev Team Member
- Posts: 1465
- Joined: Sat Apr 18, 2009 10:09 pm
- Location: Maidenhead, UK
- Contact:
Re: TinyMCE <p> <br />
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:spike wrote:something appears to have got "back to front".
http://forum.cmsmadesimple.org/viewtopi ... 79&t=61728
Re: TinyMCE <p> <br />
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
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
Re: TinyMCE <p> <br />
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
A very foolish move on Tiny's part methinks.
grumble grumble . . .
gruss - spike
Re: TinyMCE <p> <br />
http://forum.cmsmadesimple.org/viewtopi ... 18#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
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
Re: TinyMCE <p> <br />
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
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
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: TinyMCE <p> <br />
And there is absolutely no way to fix this.But there is still the problem with P surrounding module calls (which is not new problem, I admit).
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.
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.
Re: TinyMCE <p> <br />
ok, but the prefilter.anchorreplace.php works perfectly ...calguy1000 wrote:And there is absolutely no way to fix this.But there is still the problem with P surrounding module calls (which is not new problem, I admit).
a: tinymce doesn't know anything about smarty.
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: 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.
I simply cannot tell my users that they have to learn HTML for the simple task of inserting a youtube video or a GoogleMap.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 wrote a litte filter which I still have to test, so far it seems to work:
prefilter.freetag.php
Code: Select all
<?php
function smarty_cms_prefilter_freetag($tpl_source, &$smarty)
{
return preg_replace('/<p>(\{[A-Za-z0-9\\._-]+\})<\/p>/', "$1", $tpl_source);
}
?>
Cheers,
Alex
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: TinyMCE <p> <br />
Yep, tonnes... but I'll let you flail around for a few days before you find out it's problematic.Do you see any problems with this?
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.
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.
Re: TinyMCE <p> <br />
Thank you very much for sharing your insight.calguy1000 wrote:Yep, tonnes... but I'll let you flail around for a few days before you find out it's problematic.Do you see any problems with this?
Regards,
Alex
Re: TinyMCE <p> <br />
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!
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!
Re: TinyMCE <p> <br />
For videos I created a UDT:
Then in the TinyMCE in the advanced Custom drop down:
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.
Code: Select all
/*
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>';
Code: Select all
---|---
Insert Youtube iframe |{*do not put between p tags*}{elastic_youtube_iframe url=" "}
---|---
Re: TinyMCE <p> <br />
But they will have to do this *every time* they re-edit the page.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.
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