I am currently using ruby tags to include pinyin in my text. For instance:
<p>
<ruby>与<rt>yǔ</rt></ruby><ruby>摩<rt>mó</rt></ruby><ruby>拜<rt>bài</rt></ruby><ruby>单<rt>dān</rt></ruby><ruby>车<rt>chē</rt></ruby><ruby>推<rt>tuī</rt></ruby><ruby>出<rt>chū</rt></ruby><ruby>的<rt>de</rt></ruby>...
</p>
However, when attempting to copy the text, it also copies the pinyin:
与yǔ摩mó拜bài单dān车chē推tuī出chū的
I would like to exclude the pinyin from being copied. For example, if I want to paste a sentence into Google Translate. Is there a way to achieve this without relying on Javascript?
I have experimented with the user-select
CSS property and unselectable
HTML attribute, but unfortunately, neither of them seem to work as intended.
This functionality is essential for a Chrome extension, so compatibility with Chrome is the main priority.