# When pasting text into the editor using Firefox, it incorrectly formats the text

**URL:** https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100
**Category:** Bug
**Created:** [8 Marzo, 2015 10:51 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100 "2015-03-08T10:51:15Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [8 Marzo, 2015 10:51 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/1 "2015-03-08T10:51:15Z")

</div>

Some of my [users identified this issue](http://discourse.wastingyourlife.co/t/discussion-and-feedback-about-discourse/59/224?u=chapel) and I was able to reproduce it on my forum as well as here.

Specifically what is happening is the editor is changing the formatting of the pasted text, either by adding new lines where there were none, or removing them.

What it should look like:

> “Hello. My name is David, and I’m a quinquagenerian.”

> Game industry veteran David Mullich kicked off a panel discussion on game industry ageism today at the 2015 Game Developers Conference like he was introducing himself at a group therapy session.

> It was a light-hearted way to address an insidious problem.

It turns out like this:

> “Hello. My name is David, and I’m a quinquagenerian.”

> Game industry veteran  
> David Mullich kicked off a panel discussion on game industry ageism  
> today at the 2015 Game Developers Conference like he was introducing  
> himself at a group therapy session.

> It was a light-hearted way to address an insidious problem.

Source of above text: [news](http://gamasutra.com/view/news/238236/Im_still_creative__Game_industry_vets_rally_against_ageism.php)

One of my users had to paste the text into a text editor then into the edit box to get the intended formatting.

I honestly don’t know if this is a Firefox bug or a Discourse bug, but other text inputs on Firefox don’t display this issue in my testing.

If I copy and paste the properly formatted text from this post back into here, I get this:

> “Hello. My name is David, and I’m a quinquagenerian.”Game  
> industry veteran David Mullich kicked off a panel discussion on game  
> industry ageism today at the 2015 Game Developers Conference like he was  
> introducing himself at a group therapy session. It was a light-hearted way to address an insidious problem.

This is from the first improperly formatted result from before:

> “Hello. My name is David, and I’m a quinquagenerian.”Game industry veteran  
> David Mullich kicked off a panel discussion on game industry ageism  
> today at the 2015 Game Developers Conference like he was introducing  
> himself at a group therapy session. It was a light-hearted way to address an insidious problem.

Notice the slight difference in where it inserted the new lines?

Also noticed that sometimes when pasting in some text on Firefox, the preview doesn’t reflect the new text until I make another change.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [8 Marzo, 2015 13:45 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/2 "2015-03-08T13:45:20Z")

</div>

Firefox is _weird_.

- Copy from Firefox, paste in Firefox → as reported.
- Copy from Chrome, paste in Firefox → no newlines at all.
- Copy from Chrome, paste in Notepad, copy again and paste in Firefox → works.
- Copy from Firefox and paste in Chrome → works too.

My guess is that both browsers put richtext into the clipboard, and Firefox has problems with pasting that into a plaintext input field. Or could it be that Discourse somehow makes FF think that the editor supports richtext?

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [9 Marzo, 2015 20:27 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/3 "2015-03-09T20:27:02Z")

</div>

Any help with this? I guess I expect at least someone from the core team to respond. If I had more time I would look into it myself, but I won’t have time for a week or more. ☹

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [9 Marzo, 2015 21:49 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/4 "2015-03-09T21:49:13Z")

</div>

Sounds like a plausible bug, we will get to it at some point but not sure if in the next couple of weeks.

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [10 Marzo, 2015 00:50 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/5 "2015-03-10T00:50:10Z")

</div>

Thanks, wasn’t expecting a fast fix.

---

<div class="post-metadata">

### Author: ![Stefan\_Fairphone](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stefan_fairphone/32/119580_2.png) [@Stefan\_Fairphone](https://meta.discourse.org/u/Stefan_Fairphone)
#### Post date: [15 Junio, 2016 18:38 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/6 "2016-06-15T18:38:39Z")

</div>

I can still reproduce this and it bugs me because it makes longer texts unreadable (or I have to reformat pasted text). There is a reason why people use newlines and this Discourse/Firefox behaviour I experience ridicules the idea of newlines.

I’m on Firefox 47.0 and we are using Discourse _v1.6.0.beta8 +25_.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [16 Junio, 2016 13:43 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/7 "2016-06-16T13:43:10Z")

</div>

Using Ctrl+v to paste produces the weird formatting as reported. Pasting with the middle button doesn’t.

Currently Firefox 47 on Ubuntu Gnome 16.04, but it’s been like this on Ubuntu for as long as I can remember.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [8 Octubre, 2025 15:03 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/8 "2025-10-08T15:03:02Z")

</div>

Acabo de encontrar este informe de error muy antiguo. Acabo de probarlo usando Firefox en mi Mac y no tengo reproducción. Estableceré un temporizador para cerrar este tema, así que si alguien todavía tiene este problema, ¡hable y comparta los pasos de reproducción!

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [7 Noviembre, 2025 15:03 UTC](https://meta.discourse.org/t/when-pasting-text-into-the-editor-using-firefox-it-incorrectly-formats-the-text/26100/9 "2025-11-07T15:03:35Z")

</div>

Este tema se cerró automáticamente 30 días después de la última respuesta. Ya no se permiten nuevas respuestas.
