Skip to main content

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

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

Parameters

Name Type Description
configurator Action<CollectionFactory<HtmlEditorMentionBuilder>>

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

Returns

Type Description
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.

@(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