Skip to content

[Wiki]: Update Embedding-guide.md #3501

@dixita0607

Description

@dixita0607

Issue description

After adding "Copy to clipboard" functionality, this guide needs to be updated. When embedding the dartpad in an iframe, allow="clipboard-write" needs to be set for the copy to work.

Reference: Chromium's documentation on permissions in cross-origin iframes

Proposed changes to the wiki

The form of embedding previously documented here is no longer supported by DartPad.

You can still use DartPad's gist support to embed a DartPad as a normal iframe:

<iframe src="https://dartpad.dev/?id=5c0e154dd50af4a9ac856908061291bc?theme=light" allow="clipboard-write"></iframe>

Note: The allow="clipboard-write" permission is required for the copy to clipboard button to work in the embedded DartPad. See Chromium's documentation on permissions in cross-origin iframes for more information.

Follow #2702 for the future of DartPad embed support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions