Placeholders
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.
<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:
- Click the Insert Placeholder toolbar button (ToolbarInsertPlaceholderDialogButton).
- Click Change Placeholder… in the context menu.
- Double-click a placeholder.
- Call the ASPxClientHtmlEditor.ExecuteCommand method with the INSERTPLACEHOLDER_DIALOG_COMMAND or CHANGEPLACEHOLDER_DIALOG_COMMAND parameter.
To replace placeholders with the required values, use the client-side ASPxClientHtmlEditor.ReplacePlaceholders or server-side ASPxHtmlEditor.ReplacePlaceholders method.