Hi!
Please, try the following code:
<dxhe:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
<Toolbars>
<dxhe:CustomToolbar>
<Items>
<dxhe:CustomToolbarButton CommandName="CustomSpellChecking"
Text="CustomSpellChecking">
</dxhe:CustomToolbarButton>
</Items>
</dxhe:CustomToolbar>
</Toolbars>
<ClientSideEvents CustomCommand="function(s, e) { OnCustomCommand(s, e.commandName); }" />
</dxhe:ASPxHtmlEditor>
<script type="text/javascript">
function OnCustomCommand(htmlEditor, commandName) {
if (commandName == "CustomSpellChecking") {
CustomSpellChecking(htmlEditor);
}
}
function CustomSpellChecking(htmlEditor) {
var html = htmlEditor.GetHtml();
if (html != "<p></p>") // some conditions
htmlEditor.ExecuteCommand(ASPxClientCommandConsts.CHECKSPELLING_COMMAND);
}
</script>
Let me know whether this code helps you.