Skip to main content

Client-Side Methods and Properties

Use the following methods and properties to specify and obtain ASPxHtmlEditor content:

  • The client-side ASPxClientHtmlEditor.GetHtml method obtains the editor’s content as HTML markup.

    <dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server" 
        ClientInstanceName="htmlEditor">
    </dx:ASPxHtmlEditor>
    <br/>
    <dx:ASPxButton ID="ASPxButton1" runat="server" 
        AutoPostBack="False" Text="ASPxButton">
        <ClientSideEvents Click="function(s, e) {
            var myText = htmlEditor.GetHtml();
            myMemo.SetText(myText); 
         }" />
    </dx:ASPxButton>
    <br/>
    <dx:ASPxMemo ID="ASPxMemo1" runat="server" 
        ClientInstanceName="myMemo"  Height="71px" Width="170px">
    </dx:ASPxMemo>
    
  • The client-side ASPxClientHtmlEditor.SetHtml method specifies HTML markup to display the editor’s content.

    <dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server" 
        ClientInstanceName="htmlEditor">
    </dx:ASPxHtmlEditor>
    <br/>
    <dx:ASPxButton ID="ASPxButton1" runat="server" 
        AutoPostBack="False" Text="ASPxButton">
        <ClientSideEvents Click="function(s, e) {
            htmlEditor.SetHtml('Sample Text');
        }" />
    </dx:ASPxButton> 
    
  • The ASPxHtmlEditor.Html property specifies the HTML markup to display the ASPxHtmlEditor’s content.

    <dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server" 
        ClientInstanceName="htmlEditor"
        Html="&lt;STRONG&gt;Sample Text&lt;/STRONG&gt;" >
    </dx:ASPxHtmlEditor>
    
See Also