# Get back the real "raw" data that created a post?

**URL:** https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183
**Category:** Development
**Created:** [May 4, 2021, 6:48pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183 "2021-05-04T18:48:10Z")
**Posts on this page:** 14
**Page:** 2

<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: [May 5, 2021, 6:14am UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/21 "2021-05-05T06:14:39Z")

</div>

If you’re using chrome desktop then you can use Ctrl+Shift+V to paste as plain text instead of notepad.

Also in the admin site settings page, you can disable this fancy pasting behavior by unchecking the “`enable rich text paste`” option.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 5, 2021, 11:59am UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/22 "2021-05-05T11:59:48Z")

</div>

Thanks, but my goal is to _keep_ the original formatting from microsoft word (in the raw data), not strip it down to plain text.

Currently, Discourse removes a variety of the formatting–such as font size and font type, while leaving others (bold and italics seem to stay there). As a comparison, Gmail composer seems to leave all formatting.

To try to keep more formatting, I suppose an alternative would be to upload a word document (not paste in text to the composer–but upload the actual doc). The problem there, I think, is that discourse does not show the contents of the upload inline (it just displays an upload link).

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [May 5, 2021, 5:02pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/23 "2021-05-05T17:02:33Z")

</div>

> [@JQ331](#):
>
> Thanks, but my goal is to _keep_ the original formatting from microsoft word (in the raw data), not strip it down to plain text.

Then paste the raw HTML.

> [@JQ331](#):
>
> As a comparison, Gmail composer seems to leave all formatting.

There are different goals involved. Gmail’s goal is to preserve all the formatting, whereas a forum’s goal is to keep a meaningful subset of it while preventing abuse (huge text, blinking text, OVERLY LARGE FONTS, annoying colours, etc.)

As a simple example, here is some simple text’s HTML as generated by Office, present in the clipboard as `text/html`:

```plaintext
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<title></title>
	<meta name="generator" content="LibreOffice 7.1.2.2 (Linux)"/>
	<style type="text/css">
		@page { size: 21.59cm 27.94cm; margin: 2cm }
		p { margin-bottom: 0.25cm; line-height: 115%; background: transparent }
	</style>
</head>
<body lang="en-CA" link="#000080" vlink="#800000" dir="ltr"><p style="margin-bottom: 0cm; line-height: 100%">
<b>Hello there</b><span style="font-weight: normal"> sunshine </span><i><span style="font-weight: normal">eh</span></i></p>
</body>
</html>

```

It looks like:

 @page { size: 21.59cm 27.94cm; margin: 2cm } p { margin-bottom: 0.25cm; line-height: 115%; background: transparent } 

**Hello there** sunshine _eh_

But when interpreted by `to-markdown.js` you get:

```plaintext
**Hello there** sunshine *eh*

```

**Hello there** sunshine _eh_

> [@JQ331](#):
>
> Thanks, but my goal is to _keep_ the original formatting from microsoft word (in the raw data)

You cannot, unless you put it there yourself as I did in this post. If you _really need it there_, hide it in a comment. If you want to later convert it yourself to markdown, use something like [pandoc](https://pandoc.org/).

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 5, 2021, 5:15pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/24 "2021-05-05T17:15:59Z")

</div>

> [@supermathie](#):
>
> There are different goals involved. Gmail’s goal is to preserve all the formatting, whereas a forum’s goal is to keep a meaningful subset of it while preventing abuse

I support transferring to markdown on the post that is displayed to others for some consistency. It’s the raw entry I’m curious about.

> [@supermathie](#):
>
> Then paste the raw HTML.

How do you get the raw html of a word doc that you could paste in?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [May 5, 2021, 5:17pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/25 "2021-05-05T17:17:16Z")

</div>

Save it as HTML from Word, or copy it to the clipboard and pull the text/html explicitly from the clipboard.

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [May 6, 2021, 9:02am UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/26 "2021-05-06T09:02:05Z")

</div>

> [@JQ331](#):
>
> I support transferring to markdown on the post that is displayed to others for some consistency. It’s the raw entry I’m curious about.

If all you care about is being able to reference the raw input at a later point, this component might work for you.

It adds a button to the post menu that shows the raw content on a per-post basis.

> [@Raw Post Button](https://meta.discourse.org/t/raw-post-button/152542):
>
> discourse2Summary Raw Post Button will add a button to the post menu. When you click the button, you’ll get a modal / popover with the raw (markdown) version of the post.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/raw-post-button)hammer_and_wrenchRepository Link [https://github.com/discourse/raw-post-button](https://github.com/discourse/raw-post-button)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features Settings …

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [November 30, 2025, 2:56pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/27 "2025-11-30T14:56:52Z")

</div>

@jomaxro, what is the syntax for the raw markup of a comment?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 30, 2025, 3:16pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/28 "2025-11-30T15:16:24Z")

</div>

What are you asking for? Are you asking what markdown is? Like [https://commonmark.org/](https://commonmark.org/) Are you asking how to get the raw markdown for a post? Like `/raw/123`

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [November 30, 2025, 3:22pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/29 "2025-11-30T15:22:43Z")

</div>

For a single post, you can add the ID to the URL. For example, when I share your post, the link is [https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/27](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/27), and [https://meta.discourse.org/raw/189183/27](https://meta.discourse.org/raw/189183/27) is the raw version of your reply.

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [November 30, 2025, 5:28pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/30 "2025-11-30T17:28:09Z")

</div>

> [@pfaffman](#):
>
> Are you asking how to get the raw markdown for a post? Like `/raw/123`

@pfaffman, the latter. Thanks, @Moin. That’s obvious, in retrospect… Apologies.

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [January 23, 2026, 11:01pm UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/31 "2026-01-23T23:01:17Z")

</div>

@jomaxro, `/raw/` doesn’t work at any of [`discuss.kde.org/c/community/blogs/24`](https://discuss.kde.org/c/community/blogs/24)’s posts, for, at [`view-source:discuss.kde.org/raw/43656`](https://discuss.kde.org/raw/43656), I observe:

```HTML
<pre>Konqi | 2026-01-23 22:43:37 UTC | #1

&lt;p&gt;Leaking memory is impolite. It’s messy, it can suggest logic bugs, and thanks to AI grifters RAM is expensive.
&lt;/p&gt;
&lt;hr&gt;
&lt;small&gt;This is a companion discussion topic for the original entry at &lt;a href="https://nicolasfella.de/posts/detecting-leaks-in-kde-ci/?utm_source=atom_feed"&gt;https://nicolasfella.de/posts/detecting-leaks-in-kde-ci/?utm_source=atom_feed&lt;/a&gt;&lt;/small&gt;

-------------------------

</pre>

```

…whereas, when the `details` is interactively expanded at [`discuss.kde.org/t/43656`](https://discuss.kde.org/t/detecting-memory-leaks-in-kde-ci/43656?u=rokejulianlockhart), I can expand it to:

 ![](https://global.discourse-cdn.com/meta/original/4X/9/c/1/9c1c3cf2ea28a3d2d9f2d01eb82a6eae57d623a9.png)

Can this be feasibly catered for on upstream Discourse’s end? I’ve observed similar at other, slightly-customised Discourse instances, which is why I ask.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 24, 2026, 12:00am UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/32 "2026-01-24T00:00:43Z")

</div>

What problem are you trying to solve?

Those topics are special because they are links to big posts.

That is the raw text of the op.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 24, 2026, 12:40am UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/33 "2026-01-24T00:40:21Z")

</div>

The raw text of the OP in that topic is:

```plaintext
○ → curl https://discuss.kde.org/posts/132565/raw
<p>Leaking memory is impolite. It’s messy, it can suggest logic bugs, and thanks to AI grifters RAM is expensive.
</p>
<hr>
<small>This is a companion discussion topic for the original entry at <a href="https://nicolasfella.de/posts/detecting-leaks-in-kde-ci/?utm_source=atom_feed">https://nicolasfella.de/posts/detecting-leaks-in-kde-ci/?utm_source=atom_feed</a></small>

```

This is exactly what is rendered in the cooked version.

> [@roke\_julian\_lockhart](#):
>
> whereas, when the `details` is interactively expanded

It’s not a details block being expanded. A click on Show Full Post loads _something else_, which is the full expansion of the embed, which does _not_ come from the post raw but from additional post metadata.

You can see the network request in your browser when you click on it, here’s the equivalent:

```plaintext
○ → curl -s -H 'accept: application/json' 'https://discuss.kde.org/posts/132565/expand-embed' | jq -r .cooked
<div><div>
            <p>Leaking memory is impolite. It’s messy, it can suggest logic bugs, and thanks to AI grifters RAM is expensive.</p>
…
…
…
<p>LSAN is now enabled for some Frameworks CI builds, but ideally it would be enabled for all KDE projects. And of course any leaks found along the way should be fixed.</p>
<p>Happy leak-fixing!</p>
        </div></div>
<hr>
<small>This is a companion discussion topic for the original entry at <a href='https://nicolasfella.de/posts/detecting-leaks-in-kde-ci/?utm_source=atom_feed'>https://nicolasfella.de/posts/detecting-leaks-in-kde-ci/?utm_source=atom_feed</a></small>

```

Did you want to see the contents of the embed? If so, use the above. If not, what are you _expecting_ to see?

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [January 24, 2026, 1:05am UTC](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183/34 "2026-01-24T01:05:05Z")

</div>

> [@supermathie](#):
>
> Did you want to see the contents of the embed? If so, use the above.

@supermathie, indeed. Many thanks! Evidently, much more of the Discourse API exists than I’m aware of.

[Previous page](https://meta.discourse.org/t/get-back-the-real-raw-data-that-created-a-post/189183.md?page=1)
