# Enhancements to Embedding Comments

**URL:** <https://meta.discourse.org/t/enhancements-to-embedding-comments/29822>\
**Category:** Feature\
**Tags:** feedback\
**Created:** [9 Giugno 2015, 8:38pm UTC](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822 "2015-06-09T20:38:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Post date:** [9 Giugno 2015, 8:38pm UTC](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822/1 "2015-06-09T20:38:36Z")

</div>

I checked in two enhancements to embedding comments on remote sites today:

**You can now embed comments on multiple hosts.** Just use the + button to add more.

 ![](https://global.discourse-cdn.com/meta/original/3X/4/7/47c2691269cbd2c7bd9470749421949f0de347d3.png)

**You can also embed to an existing topic without creating it**. Normally embedding is meant to create the topic, but some people want to create the topic in advance and then embed its comments elsewhere. To do this, grab the `topicId` from the URL. The `topicId` is the number that immediately follows the slug. For example given the URL `http://meta.discourse.org/t/hello-world/12345/2` the `topicId` is 12345.

Use this slightly different embed code to embed by topic. Replace `discourseUrl` and `topicId` with your values:

```html
<script type="text/javascript">
  var DiscourseEmbed = {
    discourseUrl: 'http://meta.discourse.org/',
    topicId: 29425
  };

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
      d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
  })();
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/enhancements-to-embedding-comments/29822)._
