Back to Devexpress

Placeholders

aspnet-12376-components-html-editor-concepts-placeholders.md

latest2.1 KB
Original Source

Placeholders

  • Sep 22, 2023

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

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

aspx
<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.

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)