Annotation does not work properly (japanese)
When I highlight, I can copy the kanji text. However, in annotate section, kanji and furigana get mixed up
Thank you for pointing this out. Thorium uses the standard Web API to obtain the text inside the DOM selection (element.textContent). This is plain text, no HTML markup. So, it looks like we need to suppress the Ruby, just like cliboard copy/paste?
With me, I just need annotate kanji text.
In epub, furigana use the <ruby> element.
Example 1: <ruby>空<rt>そら</rt></ruby>
With 1 word (Example 1) , we can obtain kanji with element.firstChild.textContent
But with 2 words or more, there are 2 situation.
Example 2: <ruby>季節<rt>きせつ</rt></ruby>
Example 3: <ruby>季<rt>き</rt>節<rt>せつ</rt></ruby>
Example 2 use element.firstChild.textContent like Example 1.
In Example 3, I think should use Regex to remove all <rt> tag and text in it. element.innerHTML.replace(/<rt>.*?<\/rt>/g, '')