Improve BCodeEdit

Fix highlighting on text insertion.