Back to Devexpress

HtmlEditorBuilder.Mentions(Action<CollectionFactory<HtmlEditorMentionBuilder>>) Method

aspnetcore-devextreme-dot-aspnet-dot-mvc-dot-builders-dot-htmleditorbuilder-dot-mentions-x28-system-dot-action-devextreme-dot-aspnet-dot-mvc-dot-factories-dot-collectionfactory-devextreme-dot-aspnet-dot-mvc-dot-builders-dot-htmleditormentionbuilder-x29.md

latest2.2 KB
Original Source

HtmlEditorBuilder.Mentions(Action<CollectionFactory<HtmlEditorMentionBuilder>>) Method

Provides access to the client-side mentions option that represents a mention object collection.

Namespace : DevExtreme.AspNet.Mvc.Builders

Assembly : DevExtreme.AspNet.Core.dll

Declaration

csharp
public HtmlEditorBuilder Mentions(
    Action<CollectionFactory<HtmlEditorMentionBuilder>> configurator
)

Parameters

NameTypeDescription
configuratorAction<CollectionFactory<HtmlEditorMentionBuilder>>

A function that allows you to add items to the collection.

|

Returns

TypeDescription
HtmlEditorBuilder

A reference to this instance after the method is called.

|

Remarks

To configure a mention object collection, use a multiline lambda expression. In this case, a lambda parameter performs the role of a collection factory, and its Add() method adds a new item to the collection. The Add() method returns HtmlEditorMentionBuilder whose methods you can use to configure an item.

cshtml
@(Html.DevExtreme().HtmlEditor()
    .Mentions(mentions => {
        mentions.Add(); // call methods to configure a mention object
        mentions.Add();
    })
)

Refer to Nested Options and Collections for more information.

See Also

HtmlEditorBuilder Class

HtmlEditorBuilder Members

DevExtreme.AspNet.Mvc.Builders Namespace