Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for reading/writing bookmarks from the clipboard #6233

Merged
merged 10 commits into from Jun 25, 2016

Conversation

Projects
None yet
3 participants
@kevinsawicki
Copy link
Contributor

kevinsawicki commented Jun 24, 2016

This adds two new APIs to clipboard:

  • clipboard.readBookmark() that returns an object with title and url keys
  • clipboard.writeBookmark(title, url) that writes a bookmark to the clipboard

This allows you to write combined url/titles to the clipboard and apps supporting that (like TextEdit) will paste them as hyperlinks. Apps default to using the url if pasting bookmarks isn't supported.

clipboard-bookmark

Closes #5861

@zeke

This comment has been minimized.

Copy link
Member

zeke commented Jun 24, 2016

@kevinsawicki

This comment has been minimized.

Copy link
Contributor Author

kevinsawicki commented Jun 24, 2016

Still needs to get the specs passing (or disabled) on Linux 🐧 Looks like it might not be supported there.

@kevinsawicki

This comment has been minimized.

Copy link
Contributor Author

kevinsawicki commented Jun 25, 2016

Looks like readBookmark is not supported on Linux, marking it as such in the docs.

https://cs.chromium.org/chromium/src/ui/base/clipboard/clipboard_aurax11.cc?l=822

@zcbenz

This comment has been minimized.

Copy link
Member

zcbenz commented Jun 25, 2016

👍

@zcbenz zcbenz merged commit 04b30af into master Jun 25, 2016

8 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #3526834 succeeded in 47s
Details
electron-linux-ia32 Build #3526835 succeeded in 42s
Details
electron-linux-x64 Build #3526836 succeeded in 122s
Details
electron-mas-x64 Build #1712 succeeded in 6 min 28 sec
Details
electron-osx-x64 Build #1717 succeeded in 6 min 9 sec
Details
electron-win-ia32 Build #713 succeeded in 6 min 20 sec
Details
electron-win-x64 Build #704 succeeded in 6 min 29 sec
Details

@zcbenz zcbenz deleted the clipboard-bookmark-support branch Jun 25, 2016

sindresorhus added a commit to sindresorhus/electron-context-menu that referenced this pull request Jul 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.