Fixed: setHtmlWithRange2 does not purge markers in case of invalid range.
Simplified: text marker detection and replacement in setHtmlWithRange2.