View Single Post
Old 05-01-2015, 02:45 PM   #1
Bilingual
Member
Bilingual began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2013
Device: none
Cool Is it possible to create hidden, searchable highlightable text?

My request might be impossible, but since I generally suck at HTML and CSS, I'd better ask before giving up.

I'm preparing an EPUB with a lot of key elements with variant spellings.

Let's say, I wirite a text containing the word "colour", and that word should be fully text searchable within the (long) text. Now, among my target audience there might be some americans prone to search for the "colour" word using their own spelling "color". I would very much like to acommodate that, so I have been experimenting with various formatting options. Best results obtained so far seems to be with this code:

Code:
colour<span style="font-size:0">color</span>
Searching for "color" thus bring me to the correct place in my text, BUT if at all possible, I would additionally really like "colour" to highlight in the manner as when searching by the main spelling variant.

I wonder if this could be obtained by a mixture of overlapping and transparent text elements, but my skills are sorely inadequate for the task, and intense googling around hasn't brought up any hints.

What say you? Totally impossible?
Bilingual is offline   Reply With Quote