Isn't this almost an exact copy of Editor_BidiSupport.html?   You can't copy-and-paste 20 pages of codes.   It's a maintenance nightmare.