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

Update Nr. 2: I fixed the two bugs we talked about on Saturday. The caret is now visible and the two text fields are (or I should say: made to look like they are) in perfect synch. You can see a demo at w:c:pecoes:Test

What you will see there is the textarea of the classic editor with background- and text-color set to transparent. The reason why the text is yellow is because you're looking through the textarea at a shadow copy that is kept in synch with the textarea. The caret of the textarea is invisible. The shadow copy doesn't have a caret. The thing that looks like a caret is actually a | character that is inserted into the shadow text and animated with a window.setInterval. Very complicated and very messy. But it seems to work. I tested it in the latest versions of Firefox, Safari and Chrome. It also works in Internet Explorer, but in IE the textarea's caret does not become invisible as it does in the other browsers, so you will see two carets - the real one in the texarea and the fake one in the shadow copy.

I still haven't done anything to cater to the visual editor. That means the demo only works if you have the visual editor disabled in your preferences.