Fixed bug in richeditor.js