剑道htmleditor上的自定义按钮
嗨,我正在使用剑道htmleditor 我想在剑道html编辑器上有一个自定义按钮 我试着这样做:剑道htmleditor上的自定义按钮,html,kendo-ui,editor,Html,Kendo Ui,Editor,嗨,我正在使用剑道htmleditor 我想在剑道html编辑器上有一个自定义按钮 我试着这样做: @model string @(Html.Kendo().EditorFor(m => m) .Tools(t => t .Clear() .Bold() .Italic() .ViewHtml() .TableEditing() .FontColor() .Fon
@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.Kendo().EditorFor(m=>m)
.Tools(t=>t
.Clear()
.Bold()
.Italic()
.ViewHtml()
.TableEditing()
.FontColor()
.FontName()
.FontSize()
.Template:“原始模板”,
.CustomTemplate(c=>c.Template(“”)
)
.Encode(假)
.HtmlAttributes(新的{style=“float:right;”})
)
但这不起作用
那么,如何在剑道html编辑器上创建自定义按钮呢
谢谢试试看:
@(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;" }))
@(Html.Kendo().EditorFor(m=>m)
.姓名(“编辑”)
.Tools(t=>t
.Clear()
.Bold()
.Italic()
.ViewHtml()
.TableEditing()
.FontColor()
.FontName()
.FontSize()
.CustomTemplate(c=>c.Template(“原始模板”))
)
.Encode(假)
.HtmlAttributes(新的{style=“float:right;”“}))
试试看:
@(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;" }))
@(Html.Kendo().EditorFor(m=>m)
.姓名(“编辑”)
.Tools(t=>t
.Clear()
.Bold()
.Italic()
.ViewHtml()
.TableEditing()
.FontColor()
.FontName()
.FontSize()
.CustomTemplate(c=>c.Template(“原始模板”))
)
.Encode(假)
.HtmlAttributes(新的{style=“float:right;”“}))