views:

311

answers:

1

Hello all,

Does anyone know how to fix the problem about Tinymce Line break problem on Safari and Chrome.

For example, Let's say, I have two line pure text. When I copy and paste through firefox or IE. It's under one p tag. So it's same formatting i saw in the text file which is two line.

But if i copy and paste through Chrome or Firefox, it becomes two p tag. So at display there,s one space between that two line.

I tried to add safari plugin, but nothing happens. And if i put the plugin called paste_auto_cleanup_on_paste : true, it's removing the space, but two line text became one line.

Cany anyone help me out by providing solution ? I noticed that at wordpress which is using Tinymce Editor also, doesn't occur that problem, because seems like they are using span instead of p at editor. If that's the solution, how can i change to span instead of p. Thanks for your help and greatly appreciated.


Here is when I paste through firefox and IE, firefox produces following code. That's what I want

<p>
This is line 1 <br />
This is line 2 <br />
This is line 3 <br /> 
</p>

But when I paste through Chrome and Safari, it produced following code. That's what I don't want.

<p> This is line 1 </p>
<p>This is line 2 </p>
<p>This is line 3 </p>
A: 

If you take a thorough look at the TinyMCE configuration page there are options to set conversion/removal of <br>, <p> etc. In particular I'd play around with:

And other options. In my experience with TinyMCE, the difficulty is finding the right permutation of settings that works for you, because they aren't documented well, and certain settings have non-intuitive side effects. But I've always been able to get it to do what I need to do (my goal is always to force-remove <br>s, keeping clean semantic <p>s, but each to his own...

Swingline Rage
Hi Swingline, please check my updated post. I think when you see my code, you will clear, what's the problem I got. Best regards,
knightrider