Placeholders
The ASPxHtmlEditor allows end-users to add placeholders to editor content. The placeholders can then be replaced with the required values.
The collection of placeholders available for end-users is accessed by the ASPxHtmlEditor.Placeholders property.
<dx:ASPxHtmlEditor ID="HtmlEditor" runat="server">
<Placeholders>
<dx:HtmlEditorPlaceholderItem Value="FirstName" />
<dx:HtmlEditorPlaceholderItem Value="LastName" />
<dx:HtmlEditorPlaceholderItem Value="Title" />
<dx:HtmlEditorPlaceholderItem Value="BirthDate" />
...
End-users can type a placeholder in the text or use the Insert Placeholder dialog, which allows end-users to insert and change placeholders.
The dialog can be invoked in the following ways.
- By clicking the Insert Placeholder toolbar button (ToolbarInsertPlaceholderDialogButton).
- By clicking the Change Placeholder… command in the context menu.
- By double clicking a placeholder.
- By calling 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.
Online Demo
See Also