加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

kendo-ui – Kendo UI Editor – 从编辑器菜单中删除特定工具

发布时间:2020-12-16 03:34:43 所属栏目:asp.Net 来源:网络整理
导读:如何从Kendo Editor控件中删除特定工具/按钮? 实际上,我只是想从Kendo Editor(all tools)控件中删除插入图像按钮. @(Html.Kendo().Editor() .Name("editor") .Tools(tools = tools.SubScript().SuperScript().ViewHtml())) 有任何想法吗? 解决方法 得到它
如何从Kendo Editor控件中删除特定工具/按钮?

实际上,我只是想从Kendo Editor(all tools)控件中删除插入图像按钮.

@(Html.Kendo().Editor()
  .Name("editor")
  .Tools(tools => tools.SubScript().SuperScript().ViewHtml())
)

有任何想法吗?

解决方法

得到它了.首先需要删除所有工具,然后逐个添加每个工具.它有一个Clear()方法.这是代码.

@(Html.Kendo().Editor()
    .Name(name)
    .Tools(tools => tools.Clear()                    //remove all tools
    .Bold().Italic().Underline().Strikethrough()
    .FontName().FontSize().FontColor().BackColor()
    .JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
    .InsertUnorderedList().InsertOrderedList().Indent().Outdent()
    .FormatBlock().CreateLink().Unlink()
    .SubScript().SuperScript().ViewHtml()
)

如果有其他方法,请告诉我.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读