Fandom

Wikia Developers Wiki

Shadow

844pages on
this wiki
Add New Page
Talk2 Share
Please note: This is highly experimental stuff and undergoing rapid development! It's all very much in flux at this point. It's far too early to file bug reports. Actually it's almost too early for you to take a look at this :)


This is a demo of the Shadow module. The main goal of the Shadow module is to make a Search+Replace addon for the source mode editor possible. It will allow to select text to be searched and/or replaced and highlight found matches and completed replacements. The problem this module tries to solve is that the source editor uses a simple textarea. The contents of a textarea cannot be styled individually. The proposed solution is to add a "Shadow" to the textarea. The Shadow is a regular div that's placed right behind the textarea and that contains the exact same text. The textarea's background is set to transparent which allows the Shadow to add background elements.

In the demo below the color of the textarea is set to blue while the color of the Shadow is set to black. If all goes well you shouldn't be able to see any black, when you scroll, edit, copypaste, etc. - regardless which browser you use. Textarea and Shadow should remain in synch at all times.

 


Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.