Skip to main content

Placeholders

The ASPxHtmlEditor allows users to add placeholders to editor content. The placeholders can then get the required values.

Placeholders

Use the ASPxHtmlEditor.Placeholders property to access a collection of placeholders.

<dx:ASPxHtmlEditor ID="HtmlEditor" runat="server">            
     <Placeholders>
          <dx:HtmlEditorPlaceholderItem Value="FirstName" />
          <dx:HtmlEditorPlaceholderItem Value="LastName" />
          <dx:HtmlEditorPlaceholderItem Value="Title" />
          <dx:HtmlEditorPlaceholderItem Value="BirthDate" />
...

Users can type a placeholder in the text or use the Insert Placeholder dialog, which allows users to insert and change placeholders.

ASPxHtmlEditor Insert Placeholder Dialog

Use the following techniques to invoke the dialog:

To replace placeholders with the required values, use the client-side ASPxClientHtmlEditor.ReplacePlaceholders or server-side ASPxHtmlEditor.ReplacePlaceholders method.

Online Demo

Placeholders (Mail Merge)