# Markdown Not Interpreted When Pulled from Page w/ Embedded Discussion

**URL:** https://meta.discourse.org/t/markdown-not-interpreted-when-pulled-from-page-w-embedded-discussion/69307
**Category:** Feature
**Created:** [9월 4, 2017, 1:49오전 UTC](https://meta.discourse.org/t/markdown-not-interpreted-when-pulled-from-page-w-embedded-discussion/69307 "2017-09-04T01:49:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Winsomniak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/winsomniak/32/74182_2.png) [@Winsomniak](https://meta.discourse.org/u/Winsomniak)
#### Post date: [9월 4, 2017, 1:49오전 UTC](https://meta.discourse.org/t/markdown-not-interpreted-when-pulled-from-page-w-embedded-discussion/69307/1 "2017-09-04T01:49:14Z")

</div>

Please correct me if I am wrong, but it seems to me that markdown is not being interpreted when topics are generated via the embedded discussions feature.

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/2/32aa0f1beccd8d1cc7283589c3388f37eee4d2be.png)

This is a generated topic from the following page: [https://kagerochart.com/hero/tobin-the-clueless-one](https://kagerochart.com/hero/tobin-the-clueless-one)

I have configured Discourse to pull the contents of #copyme, which it does. However, the copied text is displaying _literally_.

As you can see in the screenshot, when I click the edit button, the preview is correct. If I make an update to the post, the markdown is interpreted.

Thanks

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [10월 18, 2017, 1:12오전 UTC](https://meta.discourse.org/t/markdown-not-interpreted-when-pulled-from-page-w-embedded-discussion/69307/6 "2017-10-18T01:12:04Z")

</div>

This is not a bug but a feature request.

Currently we are assuming that the embedded content will be HTML, so the `cook_method` is set to `raw_html` as per [this code](https://github.com/discourse/discourse/blob/367fb1c524cff06a33c7a4144cd13a270a9f3489/app/models/topic_embed.rb#L64).

The better solution here is to add a new site setting to control `cook_method` for embedded topics.

#pr-welcome

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [3월 8, 2018, 6:57오전 UTC](https://meta.discourse.org/t/markdown-not-interpreted-when-pulled-from-page-w-embedded-discussion/69307/7 "2018-03-08T06:57:34Z")

</div>

> [@Winsomniak](#):
>
> If I make an update to the post, the markdown is interpreted.

This was because when editing a post we were ignoring `cook_method `, @gerhard recently _fixed_ this via:

[https://github.com/discourse/discourse/commit/4205c1ad2bcbd2572fb4b7eb37c641a4c4db5cec](https://github.com/discourse/discourse/commit/4205c1ad2bcbd2572fb4b7eb37c641a4c4db5cec)

So now when editing the embedded topic the markdown will not work, which seems like a bug to me.

> [@techAPJ](#):
>
> The better solution here is to add a new site setting to control cook\_method for embedded topics.

I have added this to my priority list since there is no workaround now except to edit a post in HTML format, which is not convenient.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [3월 11, 2018, 4:07오전 UTC](https://meta.discourse.org/t/markdown-not-interpreted-when-pulled-from-page-w-embedded-discussion/69307/8 "2018-03-11T04:07:45Z")

</div>

> [@techAPJ](#):
>
> The better solution here is to add a new site setting to control cook\_method for embedded topics.

Done via:

[https://github.com/discourse/discourse/commit/12706c4b295d260bbf34f5a8afc7e31971b3ea45](https://github.com/discourse/discourse/commit/12706c4b295d260bbf34f5a8afc7e31971b3ea45)

There is a new site setting `embed support markdown` (default off), if enabled the rendering will be same as what we have for topics created on Discourse composer.
