Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxHtmlEditor.MarkupChanged Event

Fires when the editor markup changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<string> MarkupChanged { get; set; }

#Parameters

Type Description
String

The editor markup.

#Remarks

Handle the MarkupChanged event to respond to the Markup change. Note that you do not need to handle this event to update markup source when you use two-way data binding for the Markup property (@bind-Markup).

#Example

The following code snippet validates user input in the MarkupChanged event handler:

HTML Editor - Right Validation Message Position

Razor
<DxHtmlEditor Markup="@markup"
              IsValid="@isValid"
              ValidationMessage="Empty markup."
              ValidationMessagePosition="HtmlEditorValidationMessagePosition.Right"
              MarkupChanged="@OnMarkupChanged"
              Height="100px"
              Width="80%" />

@code {
    bool isValid;
    string markup { get; set; } = "";
    void OnMarkupChanged(string newValue) {
        markup = newValue;
        isValid = !string.IsNullOrEmpty(newValue);
    }
}
See Also