A newer version of this page is available. Switch to the current version.

ASPxClientRichEdit Class

A client-side equivalent of the ASPxRichEdit control.


declare class ASPxClientRichEdit extends ASPxClientControl


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


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


<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;
<dx:ASPxButton runat="server" ID="Button1" Text="Get All Text" AutoPostBack="false">
    <ClientSideEvents Click="function(s, e) { alert(getAllText()); }" />
<dx:ASPxButton runat="server" ID="Button2" Text="Get Selected Text" AutoPostBack="false">
    <ClientSideEvents Click="function(s, e) { alert(getSelectedText()); }" />

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