What an embed is
An embed is the share token served at /embed/<token> in a chrome-free view built for iframes. It shows the diagram, the zoom controls and an Export menu, plus a small 'Made with Runic' badge in the bottom-left corner that opens Runic in a new tab. Processes and sequence diagrams both embed.
The snippet Runic copies is an 800 by 480 iframe with a light border, rounded corners, lazy loading and allowfullscreen. Change width and height to fit the page; the diagram scrolls inside the frame.
How it stays current
The embed loads the document on the server, then asks /api/shared/<token> every 60 seconds. When the text differs, the frame re-renders in place with no reload and no banner, so a wiki page that has been open all day shows the current flow.
Share pages and embeds are the only Runic pages allowed inside an iframe. Every other page sends frame-ancestors 'none' and X-Frame-Options: DENY.
Why it matters
A screenshot of a process rots the day after you paste it. An embed reads from the same text the editor reads, so the diagram in the doc and the diagram in Runic cannot disagree. You edit once and every page that embeds it follows.
Because the embed is the share token, revoking the share link takes every embed down with it. That is the off switch.
Limits and gotchas
Embeds always lay processes out top-to-bottom; the Flow direction button is still drawn in the frame but does nothing. Zoom runs from 25% to 250%. Cross-process jumps do nothing, since only this document is shared.
Polling only sees saved text. Runic autosaves about 600 ms after you stop typing, so the embed catches up on its next 60-second tick.
Embed pages send noindex headers. The token is the only protection: anyone who can see the iframe's URL can also open /s/<token> directly.
How to use it
- Create the share link firstClick Share on the diagram pane, then Create share link. The embed option appears once a link exists.
- Click Copy embedThe button flips to Copied and your clipboard holds the iframe snippet.
- Paste it into your pageAny page that renders raw iframes, such as a wiki or a CMS with an HTML block. Adjust width and height in the snippet if 800 by 480 does not suit the layout.
- Keep editing in RunicOpen embeds refresh within a minute of each save. There is nothing to re-paste.
- Take it down with RevokeBack in the Share menu. The next load of any embed built from that token shows 'This embed link doesn't exist.' A frame that is already open keeps its last picture until it reloads.
Commands & shortcuts
| Copy embed | Copies <iframe src="…/embed/<token>" width="800" height="480" loading="lazy" allowfullscreen> |
| /embed/<token> | Chrome-free view for iframes; polls every 60 s |
| /api/shared/<token> | Public JSON the embed polls: kind, name, text, updated_at |
| share_document (MCP) | Returns the embed URL next to the share link |
Tips
- Embeds always lay processes out top-down. For a left-to-right picture in a document, flip the direction in the editor and export an SVG instead.
- The embed view has its own Export menu, so readers of your wiki can grab a PNG or the source text without leaving the page.
- Ask Claude through MCP: share_document returns both the /s/ link and the /embed/ URL in one reply.
- Give long flows a taller frame. The frame scrolls internally, but a taller iframe reads better inside a document.
Questions
Does the reader need to sign in?
No. Embeds and share links are public by token; no account is involved.
How fast do edits show up?
Within about a minute. The embed polls every 60 seconds and swaps the text as soon as it differs.
Can I embed a sequence diagram?
Yes. The same /embed/<token> route renders sequence diagrams with the sequence pane.
Can I embed without exposing the share link?
No. The embed and the share page use the same token, so anyone who can read the iframe URL can open /s/<token>.