DxHtmlEditor.MarkupChanged Event
Fires when the Markup property value changes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[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. 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).
Note
The editor updates the Markup property value based on BindMarkupMode.
Example
The following code snippet validates user input in the MarkupChanged event handler:

<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