ASPxClientCommandConsts.COLLAPSETAG_COMMAND Property
Identifies a command that collapses the selected HTML tag.
Declaration
static COLLAPSETAG_COMMAND: string
Property Value
Type | Description |
---|---|
string | Value: “collapsetag” |
Remarks
The COLLAPSETAG_COMMAND property can be used in the following ways.
- In the ASPxClientHtmlEditor.CommandExecuted event — to determine the action performed by an end-user. If the ASPxClientHtmlEditorCommandEventArgs.commandName event parameter returns the COLLAPSETAG_COMMAND property value, this means that either the collapse button or the Collapse Tag context menu option has been clicked by an end-user.
- In the ASPxClientHtmlEditor.ExecuteCommand method — to execute the command manually.
Note
This command is available only in the HTML View when it operates in Advanced mode (the HtmlEditorHtmlViewSettings.Mode property value is set to HtmlEditorHtmlEditingMode.Advanced).
The following example illustrates how to use the COLLAPSETAG_COMMAND property.
<dx:ASPxRibbon runat="server" ID="ASPxHtmlEditor2_Ribbon" ShowFileTab="false" Width="600px">
<ClientSideEvents CommandExecuted="onRibbonCommandExecuted" />
<Tabs>
<dx:RibbonTab Text="Edit">
<Groups>
<dx:RibbonGroup Text="Comment">
<Items>
<dx:RibbonButtonItem Text="Comment" Name="comment">
<SmallImage IconID="comments_editcomment_16x16">
</SmallImage>
</dx:RibbonButtonItem>
<dx:RibbonButtonItem Text="Uncomment" Name="uncomment">
<SmallImage IconID="comments_deletecomment_16x16">
</SmallImage>
</dx:RibbonButtonItem>
</Items>
</dx:RibbonGroup>
<dx:RibbonGroup Text="View">
<Items>
<dx:RibbonButtonItem Text="Collapse" Name="collapsetag">
<SmallImage IconID="arrows_next_16x16">
</SmallImage>
</dx:RibbonButtonItem>
<dx:RibbonButtonItem Text="Expand" Name="expandtag">
<SmallImage IconID="arrows_prev_16x16">
</SmallImage>
</dx:RibbonButtonItem>
</Items>
</dx:RibbonGroup>
<dx:RibbonGroup Text="Misc">
<Items>
<dx:RibbonButtonItem Text="Format Document" Name="formatdocument">
<SmallImage IconID="actions_reading_16x16">
</SmallImage>
</dx:RibbonButtonItem>
<dx:RibbonButtonItem Text="Show Intellisense" Name="showintellisense">
<SmallImage IconID="actions_show_16x16">
</SmallImage>
</dx:RibbonButtonItem>
</Items>
</dx:RibbonGroup>
</Groups>
</dx:RibbonTab>
</Tabs>
</dx:ASPxRibbon>
<dx:ASPxHtmlEditor runat="server" ID="ASPxHtmlEditor2" ToolbarMode="None" ActiveView="Html">
<Settings AllowDesignView="false" AllowPreview="false">
<SettingsHtmlView EnableAutoCompletion="true" />
</Settings>
</dx:ASPxHtmlEditor>
See Also