discourse/public/javascripts
Rafael dos Santos Silva 3893e55bd5
FEATURE: Full Ember app embed mode for blog comments (#36613)
## Summary

Adds a new `fullApp` option to the embed snippet that renders the
complete Discourse Ember application in the iframe instead of the
simplified Rails-templated view. This allows embedded comments to have
the full Discourse experience including likes, reactions, and inline
replies.

When `fullApp: true` is set:
- `/embed/comments` redirects to the topic URL with `?embed_mode=true`
- Header, sidebar, and footer are hidden
- All links open in new tabs (to avoid navigating away within the
iframe)
- Iframe is scrollable with configurable height (default 600px)

Feature is gated on a hidden site setting, default disabled, named `embed_full_app`

## Demo

https://discourse-full-embed.pages.dev/embed-test


## Usage

```js
DiscourseEmbed = {
  discourseUrl: 'https://forum.example.com/',
  discourseEmbedUrl: 'EMBED_URL',
  fullApp: true,
  // embedHeight: '800px',  // optional, defaults to 600px
};
```

## Security

The `embed_mode` parameter only removes the X-Frame-Options header if:
- `embed_any_origin` site setting is enabled, OR
- The request referer matches a configured embeddable host

This matches the existing security model for `/embed/comments`.
2026-02-18 18:22:57 -03:00
..
count.js
embed-topics.js FIX: The attribute is discourse-url not data-discourse-url 2020-10-28 17:12:29 -04:00
embed.js FEATURE: Full Ember app embed mode for blog comments (#36613) 2026-02-18 18:22:57 -03:00
media-optimization-worker.js DEV: System specs for image optimization in composer (#36060) 2025-11-19 11:37:15 +10:00