I'm trying to use this answer to copy and paste hyperlinks from Chrome as plain text and it seems to work when I paste to notepad. However, regardless of user-select: none;
, when I paste the same clipboard contents to Libreoffice Writer all text is pasted. This happens when a styled block is surrounded by selectable blocks.
.unselectable {
position: absolute;
z-index: 1;
color: green;
user-select: none;
-webkit-user-select: none;
}
.selectable {
position: absolute;
z-index: 2;
color: rgba(0, 0, 0, 0);
user-select: text;
-webkit-user-select: text;
}
xxx
<p style="user-select: none;">
<a href="mailto:unselectable@b.org">unselectable</a>
</p>
<p>
<a href="mailto:default@b.org">default</a>
</p>
<div>
<p unselectable="on" class="unselectable">unselectable2</p>
<p>zzz</p>
</div>