_insertHtml function was extracted from _replaceSelection()
Calling method of null was fixed in _removeAllTagsExcept()
Refactoring
Small refactoring in _raplaceSelection() method