【问题标题】:Radeditor removing buttons in codebehindRadeditor 删除代码隐藏中的按钮
【发布时间】:2013-06-08 10:19:12
【问题描述】:

请需要一些示例代码,我正在使用 VB.net。

我在整个网站中都使用 Teleriks RadEditor,每个区域都有不同程度的访问权限和功能,因此对于每个编辑器,我想删除某些按钮,例如插入媒体按钮。

一个示例代码,很简单:

<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>
<dnn:TextEditor ID="txtInfo" runat="server" ChooseMode="False"
           Width="100%" />

在后面的代码中,我猜我需要找到控件并使用变量/控件的能力来删除按钮。

如果有人解决了这个问题,请提供一些示例代码?

【问题讨论】:

    标签: vb.net user-controls radeditor


    【解决方案1】:

    我完全从头开始重建所有按钮

    <telerik:RadEditor ID="RadEditor1" Runat="server"
             AutoResizeHeight="true" Width="100%" >
             <Tools>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="Undo" ShortCut="CTRL+Z" />
                    <telerik:EditorTool Name="Redo" ShortCut="CTRL+R" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A" />
                    <telerik:EditorTool Name="Cut" ShortCut="CTRL+X" />
                    <telerik:EditorTool Name="Copy" ShortCut="CTRL+C" />
                    <telerik:Editortool Name="Paste" ShortCut="CTRL+P" />
                    <telerik:EditorTool Name="PasteStrip" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="LinkManager" />
                    <telerik:EditorTool Name="Unlink" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="FormatBlock" />
                    <telerik:EditorTool Name="FontSize" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="Bold" ShortCut="CTRL+B" />
                    <telerik:EditorTool Name="Italic" ShortCut="CTRL+I" />
                    <telerik:EditorTool Name="Underline" ShortCut="CTRL+U" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="JustifyLeft" />
                    <telerik:EditorTool Name="JustifyCenter" />
                    <telerik:EditorTool Name="JustifyRight" />
                    <telerik:EditorTool Name="JustifyFull" />
                    <telerik:EditorTool Name="JustifyNone" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="Indent" />
                    <telerik:EditorTool name="Outdent" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="InsertUnorderedList" />
                    <telerik:EditorTool Name="InsertOrderedList" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="InsertSymbol" />
                </telerik:EditorToolGroup>
             </Tools>
            </telerik:RadEditor>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-19
      • 2013-08-15
      • 2015-04-01
      • 2011-12-05
      相关资源
      最近更新 更多