Imported topic via embedding will not render normally

Yeah, it’s more or less a problem with this specific source and the way you are using embedding.

Embedding uses the HTML of the source page and renders it unchanged within Discourse. It doesn’t interpret any Markdown. The cook_method used by Discourse for such posts is called raw_html. Unfortunately the composer’s preview knows only about the regular cook method. So, when you edit a post created by embedding, you won’t get what you see.

There are multiple options how you could resolve this:

  • Make sure the source page has good HTML and all the content you want to see in Discourse.
  • When you edit such a post, you can use everything HTML has to offer. Make good use of it and your posts will look great.
  • Create a regular topic and use Markdown for all the formatting and features like oneboxing. Configure your external site differently, so that it uses existing topics instead of creating new ones. See (Alternate Configuration) Linking to existing topics in Embedding Discourse Comments via Javascript for more information on this.
7 Likes