URL highlighting text tinkering: Difference between revisions
Jump to navigation
Jump to search
Bryandamon (talk | contribs) (Added another section.) |
Bryandamon (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
==Build the link== | |||
# Start with a normal external link bracket: | # Start with a normal external link bracket: | ||
#* <code>[</code> | #* <code>[</code> | ||
Line 21: | Line 21: | ||
Longer sections of text | ==Longer sections of text== | ||
# The same format can be used to capture longer strings without capturing all the text by separating the two sections of text with a comma <code>,</code> | # The same format can be used to capture longer strings without capturing all the text by separating the two sections of text with a comma <code>,</code> | ||
# For example: | # For example: | ||
Line 27: | Line 27: | ||
# Which results in (need to open in a new tab): | # Which results in (need to open in a new tab): | ||
#* [https://mwstake.org/mwstake/wiki/URL_highlighting_text_tinkering#:~:text={{urlencode:URLs to websites|PATH}},{{urlencode:section of the text.|PATH}} Cool tip 2] | #* [https://mwstake.org/mwstake/wiki/URL_highlighting_text_tinkering#:~:text={{urlencode:URLs to websites|PATH}},{{urlencode:section of the text.|PATH}} Cool tip 2] | ||
==Notes== | |||
* Only works on Chrome | |||
* https://www.howtogeek.com/658842/how-to-use-google-chromes-new-deep-linking-feature/ | |||
[[Category:Wiki Moment]] | [[Category:Wiki Moment]] |
Revision as of 23:49, 9 June 2020
URLs to websites (including wikis) can highlight sections of text using the pages URL, followed by #:~:text=
, and ending with the URL encoded section of the text.
Build the link
- Start with a normal external link bracket:
[
- Then add the pages URL, for example:
https://mwstake.org/mwstake/wiki/URL_highlighting_text_tinkering
- Add this little snippet:
#:~:text=
- Add the URL PATH encoded section of the text you want to highlight using
{{urlencode:string|PATH}}
{{urlencode:highlight sections of text|PATH}}
- Which results in:
- highlight%20sections%20of%20text
- Then finish with a space (normal for an external link), the alternative text (probably ideal since the URL will likely be long), and then a closing bracket:
Cool highlighted link]
- Putting this all together, you get:
[https://mwstake.org/mwstake/wiki/URL_highlighting_text_tinkering#:~:text={{urlencode:highlight sections of text|PATH}} Cool tip]
- Which results in (need to open in a new tab):
Longer sections of text
- The same format can be used to capture longer strings without capturing all the text by separating the two sections of text with a comma
,
- For example:
[https://mwstake.org/mwstake/wiki/URL_highlighting_text_tinkering#:~:text={{urlencode:URLs to websites|PATH}},{{urlencode:section of the text.|PATH}} Cool tip 2]
- Which results in (need to open in a new tab):
Notes
- Only works on Chrome
- https://www.howtogeek.com/658842/how-to-use-google-chromes-new-deep-linking-feature/