Thread:Kangaroopower/@comment-3508190-20120413185323/@comment-3508190-20120414175907

Alright. I can say this for certain now: It's absolutely and completely impossible to style the contents of a textarea. There are two possible solutions:


 * 1) Place a contenteditable container on top of the source editor. That is what wikEd and the RTE do. It essentially means creating a new editor.
 * 2) Place a container behind the textarea, set text- and background-color of the textarea to transparent and mirror the contents of the textarea to the background-container.

I've created a little demo of option nr. 2 at my sandbox wiki. When you edit that page, you will find that the word "test" gets highlighted automatically. The code is at w:c:pecoes:Sandbox/demo.js. The demo still a bit buggy and laggy. This will take quite a bit of work to get right, but I think it can be done.