# Is it possible to replace/change an embedded post's behavior?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-replace-change-an-embedded-posts-behavior/105208>\
**Category:** Product Support\
**Created:** [28 בדצמבר,‏ 2018,‏ 6:22pm UTC](https://meta.discourse.org/t/is-it-possible-to-replace-change-an-embedded-posts-behavior/105208 "2018-12-28T18:22:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [31 בדצמבר,‏ 2018,‏ 12:34am UTC](https://meta.discourse.org/t/is-it-possible-to-replace-change-an-embedded-posts-behavior/105208/2 "2018-12-31T00:34:20Z")

</div>

> [@FoohonPie](#):
>
> I’m editing the original first post in the topic and replacing it with the original markdown from my blog. All is well in the preview, but the end result ends up as a jumble of un-rendered markdown with all newlines removed; a giant block of text. Additionally, the “Show Full Post” and “This is a companion discussion topic…” still persist.

Yeah this is tricky, there is metadata that needs to be nuked. You could try taking a **FULL BACKUP** and then:

```plaintext
./launcher enter app
rails c
Post.where('id in (select post_id from topic_embeds)').update_all(cook_method: 1)
TopicEmbed.destroy_all

```

⚠ This may work, or it may obliterate data you don’t want obliterated. If you want the “safe” way, you are going to need to recreate topics and move posts.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-replace-change-an-embedded-posts-behavior/105208)._
