Tinymce line break issue in Safari and Chrome

Does anyone know how to troubleshoot a Tinymce line break issue in Safari and Chrome.

For example, let them say I have clear text. When I copy and paste through firefox or IE. It is under one p-tag. So I saw the same formatting in a text file, which is two lines.

But if I copy and paste through Chrome or Firefox, it becomes two p tags. Thus, the display has one space between two lines.

I tried adding a Safari plugin but nothing happens. And if I put a plugin named paste_auto_cleanup_on_paste: true, it will remove the space, but the text from two lines will become one line.

Cani help someone by providing a solution? I noticed that in wordpress, which uses the Tinymce Editor, this problem also does not occur, because it looks like they are using span instead of p in the editor. If this is a solution, how can I change to span instead of p. Thanks for your help and very grateful.


That's when I embed through firefox and IE, firefox produces the following code. This is 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 creates the following code. This is what I do not want.

 <p> This is line 1 </p> <p>This is line 2 </p> <p>This is line 3 </p> 
+6
javascript google-chrome safari tinymce
source share
3 answers

If you look in detail at the TinyMCE configuration page , there are options to install / uninstall <br> , <p> , etc. In particular, I would play with:

And other options. In my experience with TinyMCE, it’s hard to find the right rearrangement of settings that works for you because they are poorly documented and some settings have unintuitive side effects. But I could always make him do what I needed (my goal is always to forcibly remove <br>s , preserving pure semantic <p> s, but each to its own ...

+2
source share

You tried to enable the paste plugin in

 tinyMCE.init({ ... plugins : "paste", ... }); 

?

As an example, this link has no http://jsbin.com/obekev insert and will see Path: p Β» p if you try to insert multiple lines in safari or chrome

and in this folder http://jsbin.com/axipof/2 is included, and this time you will see Path: p : make sure your problem is fixed with the insert turned on :)

Hope this helps!

+2
source share

I think it is known to be broken in Chrome. If you enable the "paste" button and click on it, TinyMce will display a pop-up window "Currently not supported by your browser, use the keyboard shortcuts instead"

+1
source share

All Articles