ASPxClientRichEdit Class

A client-side equivalent of the ASPxRichEdit control.

Declaration

declare class ASPxClientRichEdit extends ASPxClientControl

Remarks

The ASPxClientRichEdit object serves as a client-side equivalent of the ASPxRichEdit control.

ASPxRichEdit-class

Use the ClientInstanceName property to programmatically access the client object rendered for the ASPxRichEdit control in client-side script.

Example

<script type="text/javascript">
    function getAllText() {
        return RichEdit.document.activeSubDocument.text;
    }
    function getSelectedText() {
        var firstSelectedInterval = RichEdit.selection.intervals[0];
        var selectedText = RichEdit.document.activeSubDocument.text.substr(firstSelectedInterval.start, firstSelectedInterval.length);
        return selectedText;
    }
</script>
<dx:ASPxButton runat="server" ID="Button1" Text="Get All Text" AutoPostBack="false">
    <ClientSideEvents Click="function(s, e) { alert(getAllText()); }" />
</dx:ASPxButton>
<dx:ASPxButton runat="server" ID="Button2" Text="Get Selected Text" AutoPostBack="false">
    <ClientSideEvents Click="function(s, e) { alert(getSelectedText()); }" />
</dx:ASPxButton>

<dx:ASPxRichEdit ID="RichEdit" runat="server" ClientInstanceName="RichEdit">
</dx:ASPxRichEdit>
See Also