blazor-devexpress-dot-blazor-dot-dxhtmleditormention.md
Specifies a character that activates the mention list on user input.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue("@")]
[Parameter]
public string Marker { get; set; }
| Type | Default | Description |
|---|---|---|
| String | "@" |
The mention marker.
|
Add a DxHtmlEditorMention object to the mention collection to create a mention list. To activate the mention list, a user types the corresponding marker. The default mention marker is @.
You need to specify the Marker property in the following cases:
The following code snippet creates a mention list with a custom marker:
<DxHtmlEditor Height="200px">
<DxHtmlEditorMentions>
<DxHtmlEditorMention Data="@EmployeesData"
DisplayFieldName="@nameof(MentionData.Name)"
SearchFieldNames="@SearchFieldNames"
Marker="$" />
</DxHtmlEditorMentions>
</DxHtmlEditor>
@code {
string[] SearchFieldNames = { nameof(MentionData.Name) };
class MentionData {
public string Name { get; set; }
public string Team { get; set; }
}
MentionData[] EmployeesData = {
new MentionData() { Name = "John Heart", Team = "Engineering" },
new MentionData() { Name = "Kevin Carter", Team = "Engineering" },
new MentionData() { Name = "Olivia Peyton", Team = "Management" },
new MentionData() { Name = "Robert Reagan", Team = "Management" },
new MentionData() { Name = "Cynthia Stanwick", Team = "Engineering" },
new MentionData() { Name = "Brett Wade", Team = "Analysis" },
new MentionData() { Name = "Greta Sims", Team = "QA" },
};
}
See Also