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

DxHtmlEditorMention.Marker Property

Specifies a character that activates the mention list on user input.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue("@")]
[Parameter]
public string Marker { get; set; }

#Property Value

Type Default Description
String "@"

The mention marker.

#Remarks

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:

  • If you need to change the mention list marker.
  • To allow users to address members of multiple mention lists in the mention collection. If two or more mention lists in the same collection have the same marker, the marker activates only the last mention list that uses this marker.

#Example

The following code snippet creates a mention list with a custom marker:

Html Editor - Mention Marker Customization

Razor
<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