mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 10:30:31 +08:00
## 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`. |
||
|---|---|---|
| .. | ||
| count.js | ||
| embed-topics.js | ||
| embed.js | ||
| media-optimization-worker.js | ||