Need help with link-to-text-fragment?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

GoogleChromeLabs
145 Stars 12 Forks Apache License 2.0 88 Commits 1 Opened issues

Description

Browser extension that allows for linking to arbitrary text fragments.

Services available

!
?

Need anything else?

Contributors list

Link to Text Fragment

  • 📖 Article: https://web.dev/text-fragments/
  • 🧩 Extension: https://chrome.google.com/webstore/detail/link-to-text-fragment/pbcodcjpfjdpcineamnnmbkkmkdpajjg
  • 🎬 Demo video: https://www.youtube.com/watch?v=Y5DmGqnzvBI

Installation

You can install the extension in your browser of choice:

Usage

The Link to Text Fragment extension allows for the easy creation of text fragment URLs via the context menu:

  1. Select the text that you want to link to.
  2. Right-click and choose "Copy Link to Selected Text" from the context menu.
  3. If the link creation succeeded, the selected text will be briefly highlighted in yellow.
  4. Paste your link wherever you want to share it.

Text fragment selected on a webpage and contextmenu showing "Copy Link to Selected Text"

Background

The Text Fragments specification adds support for specifying a text snippet in the URL fragment.

#:~:text=[prefix-,]textStart[,textEnd][,-suffix]

When navigating to a URL with such a fragment, the user agent can quickly emphasize and/or bring it to the user's attention.

Try it out by clicking on this link: https://wicg.github.io/scroll-to-text-fragment/#ref-for-fragment-directive:~:text=%23%3A~%3Atext%3D%5Bprefix%2D%2C%5DtextStart%5B%2CtextEnd%5D%5B%2C%2Dsuffix%5D.

Acknowledgements

Text Fragments was implemented and specified by Nick Burris and David Bokan, with contributions from Grant Wang. The extension icon is courtesy of Rombout Versluijs.

License

The extension's source code is licensed under the terms of the Apache 2.0 license.

This is not an official Google product. By installing this item, you agree to the Google Terms of Service and Privacy Policy at https://www.google.com/intl/en/policies/.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.