<!DOCTYPE html>
<html>
<body>
<textarea id="ta" dir="rtl">
אaב
</textarea>
<textarea id="tb">
abc
<div id="coords1">3</div>
<div id="coords2">3</div>
</body>
</html>