boolean public static \Bitrix\Fileman\Block\Editor::isHtmlDocument( string $content );
This static method checks string for available HTML.