Added rtl awareness

For Arabic/Persian p tags, direction and text-align would change to
right/rtl and for English to left/ltr.
Paste hook still needs modifications to work this way.