Intersoft Support Center

Customize Toolbar Commands

WebTextEditor provides a property to add custom toolbar using xml file.

In this topic, you will learn how to add custom toolbar.

To add custom toolbar using xml file

  1. Create an xml file that contains WebTextEditor’s toolbar collection, such as following:
     <WebTextEditorToolBarCollection>
      <WebTextEditorToolBar Name="WebTextEditor1_tbCustom" Category="Custom" Text="Custom 1">
        <ToolCommands>
          <WebTextEditorToolCommand Name="cmdChangeCase" Text="Change Case" CommandType="ChangeCase" DisplayMode="TextAndImage" Image=" tb_changecase.gif" Type="SplitButton">
            <Items>
              <WebTextEditorToolItem Name="itemUpperCase" Text="UPPER CASE" Image="tb_uppercase.gif" />
              <WebTextEditorToolItem Name="itemLowerCase" Text="lower case" Image=" tb_lowercase.gif" />
            </Items>
          </WebTextEditorToolCommand>
          <WebTextEditorToolCommand Name="cmdEmot" Type="ToggleButton" Text="Emot" DisplayMode="Image" Image="smiley.gif">
            <Items />
          </WebTextEditorToolCommand>
        </ToolCommands>
      </WebTextEditorToolBar>
    </WebTextEditorToolBarCollection>
  2. Under ToolBarSettings, set ToolBarMode to Custom.
  3. Define the xml file you have created in ToolBarXMLFile property.

Previous Next