Skip to content
JavaScript code for a “Copy link” button which adds custom JSON-LD data to the clipboard and drag&drop payload.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
copy-drag-json-ld.js
dump-data.html
example.html
link.svg
screenshot-dump-data.png
screenshot-example.png

README.md

js-copy-drag-json-ld

Simple JavaScript code for a “Copy link” button which adds custom JSON-LD data to the clipboard and drag&drop payload.

Try it out here: Open example.html and dump-data.html.

Click this 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.

example.html screenshot dump_data.html screenshot

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

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.