I am trying to replicate facebook status update functionality when tags are highlighted in a post. For example, you click the “@” symbol and autocomplete the page on which you are a fan, and then the marked part of the text is highlighted even when you continue to print.
After digging into dom, it looks like they pull it out just like the technique recommended by this previous answer : overlaying an absolutely positioned div on top of the text area with the tag surrounded <b>and css to highlight the tags <b>in the overlay. The key setting they add is the use of color: transparent on the overlay, so that only the highlight appears.

This avoids the ugly darkening of text written on top. Note that without this rule (when I turn it off in the dom inspector in chrome), the facebook update panel has a double text effect:

So far, so good, but now I am faced with the fact that color: transparent is not supported in ie, so there is an ugly double text effect. I looked at the status update window in ie8 and it looks like facebook went around this, but the developer tools are not powerful enough to inspect the house and see what they are doing (css check seems violated for this page).
Here is what I still look good in chrome:

and bad with double text in IE8:

? , , , , - iframe, , .
.
HTML:
<div class="textarea textareaBorder">
<textarea id="myTextarea" class="textarea realTextarea"></textarea>
<div id="myOtherTextarea" class="textarea overlayTextarea"></div>
</div>
CSS
.textarea {
font-family:monospace;
font-size: 12px;
border: 0;
width: 100%;
height: 200px;
}
.realTextarea {
margin: 0;
background: transparent;
position: absolute;
z-index: 999;
}
.overlayTextarea {
margin: 0;
position: absolute;
color:transparent;
top: 1px;
left: 1px;
z-index: 998;
}
.overlayTextarea b {
background:#add8e6;
}
.textareaBorder {
border: groove 1px #ccc;
position: relative;
width: 702px;
height: 202px;
}
JavaScript:
$("textarea.realTextarea").keyup(function(e) {
var textval = $(e.target).val();
var markedup = textval.replace(/(the magic word)/g, "<b>$1</b>")
$("#myOtherTextarea").html(markedup);
});