【发布时间】:2016-06-20 23:09:39
【问题描述】:
如何在 kendo ui 编辑器中添加行号。我没有看到任何启用行号的设置 http://docs.telerik.com/kendo-ui/controls/editors/editor/overview
【问题讨论】:
标签: kendo-ui kendo-editor
如何在 kendo ui 编辑器中添加行号。我没有看到任何启用行号的设置 http://docs.telerik.com/kendo-ui/controls/editors/editor/overview
【问题讨论】:
标签: kendo-ui kendo-editor
有一条使用CSS3 Counters 的路由。我对剑道编辑器不熟悉,因此请务必在 CSS 中添加除 p 和 ul > li 基本子元素之外的任何其他元素。
您可以保存以下 CSS 以在编辑器中加载:
body {
counter-reset: editor;
padding-left: 3em;
}
body > p,
body > ul > li {
counter-increment: editor;
}
body > p:before,
body > ul > li:before {
content: counter(editor);
background: #CCC;
position: absolute;
left: 1em;
height: 100%;
width: 2em;
}
要在编辑器中添加自定义 CSS,您可以将以上内容保存到文件中并在初始化中:
$("#editor").kendoEditor({
stylesheets: ["path_to_your.css"]
});
【讨论】: