Select Text to Share with Text Selection EnhancementWritten by Jeffrey Bennett
One of my favorite things to do when building a new website (right after the user interface) is determining the functionality.
So I read articles on Medium a lot. Like, I mean a LOT. I have hundreds bookmarked from just a few month’s worth of reading.
There’s a reason most people call me a geek. But hey, at least they call me! 📞😜
Anyway, I was inspired by their select-text-to-share functionality. It seems like a great way to gain traction and social media exposure for a new website.
So, I implimented a version of my own on this very blog.*
Text Selection Enhancement
I enhanced selection further specifically for selecting code. Just triple click any inline
code element or the dark background of any block of code, and you’ll select the entire thing every time, even if there are several lines (the default behavior is to select only a single, non-breaking line).
Check it out by selecting some text or the code block below.*
<div class="sample-code"> <p>This is purely to show you the multi-line code block selection.</p> </div> <!-- Here are some extra lines, just for effect. --> <a href="/all-about-meee/"> <img src="https://static3.pickjb.com/assets/images/jeffrey-in-caramoan-philippines.jpg" alt="Jeffrey in Caramoan, Philippines" /> </a>
P.S. If you like this site and the blog posts inside, please share them with your friends and colleagues. I would sincerely appreciate that!