【问题标题】:Custom button on kendo htmleditorkendo htmleditor上的自定义按钮
【发布时间】:2017-10-24 12:45:07
【问题描述】:

您好,我正在使用剑道 htmleditor。

我想在 Kendo html 编辑器上有一个自定义按钮。

我是这样尝试的:

@model string

@(Html.Kendo().EditorFor(m => m)
    .Tools(t => t
        .Clear()
        .Bold()
        .Italic()
        .ViewHtml()
        .TableEditing()
        .FontColor()
        .FontName()
        .FontSize()
        .Template: '<button class="k-button" onclick="buttonClick()">originele template</button>',
        .CustomTemplate(c => c.Template("<input id='TransformDropDown' style='float: right; margin-bottom: 5px;'/>"))
    )
    .Encode(false)
    .HtmlAttributes(new { style = "float: right;" })
)

但这不起作用。

那么如何在剑道html编辑器上制作自定义按钮呢?

谢谢

【问题讨论】:

标签: html kendo-ui editor


【解决方案1】:

试试看:

@(Html.Kendo().EditorFor(m => m)
    .Name("editor")
    .Tools(t => t
    .Clear()
    .Bold()
    .Italic()
    .ViewHtml()
    .TableEditing()
    .FontColor()
    .FontName()
    .FontSize()
    .CustomTemplate(c=>c.Template("<button class='k-button' style='margin-right: 10px;' onclick='buttonClick()'>originele template</button><input id='TransformDropDown' style='float: right; margin-bottom: 5px; width: 200px;'/>"))

)
.Encode(false)
.HtmlAttributes(new { style = "float: right;" }))

【讨论】:

    猜你喜欢
    • 2014-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多