js-copy-drag-json-ld example

A “Copy link” button which adds custom JSON-LD data to the clipboard and drag&drop payload.

Click this Copy link button to copy JSON-LD data to the clipboard. Drag and drop it onto another Web page to transfer JSON-LD data.

You can also Shift+Click (Windows) or Command+Click (Mac) it to open the link in a new tab.

Source code for this page on Github: example.html You can test it with dump-data.html.

Credits: The example JSON-LD data is taken from Google’s Introduction to Structured Data. The Link.svg icon used in the button is taken from Microsoft’s YamUI.