Update RichText.js

Update with proposed approach.