I'm trying to prevent certain sections of a block of text from being selected, while other parts can be.
.unsel {
font-weight: bold;
user-select:none;
}
<p>
Blah ljaskldfjalskdfjalksdfja kjalskd jfalksdjf askdfaskdskflaskjdflkas jflaskjflaksjlaksjfalksfj ksj fskfjaskl jkj slaj sasjflkasjf ks jaks fjaslkf j <span class="unsel">But you can't select me.</span> kajsdflkajs dsaslkf jalsk fjalks fjsl kfjs <span class="unsel">Or me, so there.</span>
</p>
When you highlight the text, the parts that can't be selected are not highlighted, but if I copy the text, the non-highlighted parts will still be copied.
I saw this CSS-Tricks article that says that in Chrome, the text is not hightlighted but can still be selected. So how can I prevent the text from being copied?