我们如何隐藏Ajax控件工具套件底部工具栏,它具有设计模式HTML模式和预览按钮。?
答案 0 :(得分:2)
可能还有其他方法可以通过代码来实现,但我很懒,只是添加了以下CSS:
.ajax__htmleditor_editor_bottomtoolbar {
display:none;
}
答案 1 :(得分:2)
using System;
using System.Web;
using AjaxControlToolkit.HTMLEditor;
namespace MyCustomControls
{
public class MyCustomEditor: Editor
{
protected override void FillBottomToolbar()
{
//Do not add any buttons in the bottom toolbar
//BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.DesignMode());
}
}
}
答案 2 :(得分:1)
例如,如果要隐藏“段落”工具栏项,请替换此代码
$create(AjaxControlToolkit.HTMLEditor.ToolbarButton.Paragraph,
{"activeModesIds":"0","activeSrc":this.get_imagesPath()
+"ed_format_paragraph_a.gif","downSrc":this.get_imagesPath()
+"ed_format_paragraph_a.gif","normalSrc":this.get_imagesPath()+"ed_format_paragraph_n.gif"},
null, null, $get(id+"_ctl01_ctl35"));
在AjaxControlToolkit.HTMLEditor.Client Side Editor.js中 用这个
$create(AjaxControlToolkit.HTMLEditor.ToolbarButton.Paragraph, null, null, null, $get(id+"_ctl01_ctl35"));
答案 3 :(得分:0)
AjaxControlToolkit.HTMLEditor.Toolbar test = (AjaxControlToolkit.HTMLEditor.Toolbar)Editor1.Controls[0].Controls[2].Controls[0].Controls[0];
test.Buttons.ToList().ForEach(delegate(AjaxControlToolkit.HTMLEditor.ToolbarButton.CommonButton x)
{
x.Enabled = false;
});