# HTML/RTF pasting

**URL:** https://meta.discourse.org/t/html-rtf-pasting/55913
**Category:** Feature
**Created:** [January 17, 2017, 4:40pm UTC](https://meta.discourse.org/t/html-rtf-pasting/55913 "2017-01-17T16:40:05Z")
**Posts on this page:** 17
**Page:** 4

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [October 2, 2018, 1:39am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/89 "2018-10-02T01:39:24Z")

</div>

Yes, I know that. What I’m saying is, I don’t think most users know “paste as plain text” is even an option. It pretty much negates the usefulness of code blocks.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 2, 2018, 1:39am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/90 "2018-10-02T01:39:44Z")

</div>

You can turn formatted pasting off globally in your site settings if you are a site owner.

---

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [October 2, 2018, 1:41am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/91 "2018-10-02T01:41:45Z")

</div>

Thanks for letting me know. I’m not the site owner, but I’ll bring up that option with the site owner and see what they think.

EDIT: @codinghorror Am I correct in assuming that there is no user-level setting?

---

<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: [October 2, 2018, 3:40am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/92 "2018-10-02T03:40:52Z")

</div>

I have been running into this too. Don’t know if it is a recent development but just started noticing it. I use discourse to reply to email often. When I do, I hit reply in the email and then copy and paste the entire email text into my discourse message. It recognizes one level of quoting correctly but encodes the second and third level. So I have to first paste into a plain text editor and do global search and replace, then edit, to get it to look as expected in discourse.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 2, 2018, 4:53am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/93 "2018-10-02T04:53:11Z")

</div>

use ctrl+shift+v, it is your friend 😉

---

<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: [October 2, 2018, 4:54am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/94 "2018-10-02T04:54:39Z")

</div>

If I want to lose all the other formatting too, then yes.

I will try this out next time and see how it turns out.

Thanks.

---

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [October 2, 2018, 9:56am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/95 "2018-10-02T09:56:52Z")

</div>

What about when you’re responding from your phone? At least iPhone doesn’t have the option to paste in plaintext.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 2, 2018, 9:57am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/96 "2018-10-02T09:57:08Z")

</div>

Does iPhone retain formatting when copying? I’m not sure it even does?

---

<div class="post-metadata">

### Author: ![alehandrof](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alehandrof/32/119526_2.png) [@alehandrof](https://meta.discourse.org/u/alehandrof)
#### Post date: [October 2, 2018, 9:59am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/97 "2018-10-02T09:59:19Z")

</div>

It does. I just tried it.

---

<div class="post-metadata">

### Author: ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)
#### Post date: [October 2, 2018, 10:53am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/98 "2018-10-02T10:53:34Z")

</div>

Perhaps it would make sense to add a button on the reply menu for doing a plain text paste? Though space there is already a little tight on my iPhone 8…

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [October 2, 2018, 12:32pm UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/99 "2018-10-02T12:32:13Z")

</div>

@seanblue @tobiaseigen thanks for the report. I will definitely try to improve this. But it’s not in my current priority list.

---

<div class="post-metadata">

### Author: ![Muiren](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiren/32/548809_2.png) [@Muiren](https://meta.discourse.org/u/Muiren)
#### Post date: [October 5, 2018, 10:35pm UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/100 "2018-10-05T22:35:05Z")

</div>

I agree, a plain text menu option would be great when I’m working from my phone.

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [September 23, 2019, 9:18pm UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/101 "2019-09-23T21:18:42Z")

</div>

Tried to read all of the post, but after the first several started to just skim them.

Also tried the on-line converters with

```plaintext
\+ exist

A \= b

```

but they did not convert the `\` to `\\` so instead the code\text comes out as

+ exist

A = b

* * *

Our site ([SWI-Prolog](https://swi-prolog.discourse.group/)) is for the [Prolog](https://en.wikipedia.org/wiki/Prolog) programming language SWI-Prolog and many post contain Prolog source code. Since Prolog is a logic programming language built on three basic logical operators, `and`, `or`, and `not`, and `not` is typically represented by the character `\` when used with common operators, e.g.[\=/2](https://www.swi-prolog.org/pldoc/man?predicate=%5C%3D/2) and [\+/1](https://www.swi-prolog.org/pldoc/doc_for?object=(%5C%2B)/1) and Markdown uses the `\` as an [escape character](https://enterprise.github.com/downloads/en/markdown-cheatsheet.pdf),  
often operators that are pasted when inline and not in code samples don’t show up as `\=` or `\+` but as `=` or `+` because the Markdown conversion eats the `\` thinking it is an escape.

Can this be fixed. 😃

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 24, 2019, 11:09am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/102 "2019-09-24T11:09:29Z")

</div>

You will need to paste into a code block, so type three backticks, press enter, _then_ paste?

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [September 24, 2019, 12:20pm UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/103 "2019-09-24T12:20:44Z")

</div>

> [@codinghorror](#):
>
> You will need to paste into a code block, so type three backticks, press enter, _then_ paste?

Thanks,

most users do bookend code blocks with ````prolog` and ````` and I noted in my [post](https://swi-prolog.discourse.group/t/pasting-in-line-text-containing/1303) for those that don’t.

The problem is when it is `in line` text. As we know many users do not proof read what they post, or when they do it is easy to miss a missing `\`. 😃

* * *

Details of [post](https://swi-prolog.discourse.group/t/pasting-in-line-text-containing/1303) to users at [SWI-Prolog](https://swi-prolog.discourse.group/)

If you use the `\` character with in-line text, e.g. `\=` or `\+` it will be converted to `=` or `+` which is probably not what you desired. While Discourse tries to be intelligent abut converting pasted text to HTML, it also uses [Markdown](https://enterprise.github.com/downloads/en/markdown-cheatsheet.pdf) and Markdown uses `\` as an escape character.

Example of doing it wrong, = and +.

For in-line code just bookend the text with `, e.g. `\=` or `\+` which appears as`\=` or `\+`.

or

just double up on the \, e.g. pasting \\= or \\+ appears as \= or \+.

However if you have several lines of of code, bookend the code section with ````prolog` and ````` and the code section will be converted by the source code converter for Prolog which leaves the `\` alone.

```prolog
A \= b.
\+ true.

```

* * *

Even when I pasted the copy here I had to go back to the original HTML and copy that instead of the text to make sure it was correct.

---

<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: [March 9, 2020, 6:13am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/104 "2020-03-09T06:13:27Z")

</div>

I am closing this as complete! Awesome job @vinothkannans building this.

Future refinements can go in new bug/feature topics.

---

<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: [March 9, 2020, 6:13am UTC](https://meta.discourse.org/t/html-rtf-pasting/55913/105 "2020-03-09T06:13:32Z")

</div>



[Previous page](https://meta.discourse.org/t/html-rtf-pasting/55913.md?page=3)
