/ / Limite qué herramientas están disponibles en Kendo UI Editor - kendo-ui, kendo-editor

Limite qué herramientas están disponibles en Kendo UI Editor - kendo-ui, kendo-editor

Tengo el siguiente código....

<textarea name="description" data-role="editor" class="k-textbox" data-bind="value:description"></textarea>

Esto produce un editor de kendo en lugar del área de texto y todo está bien, excepto que me gustaría limitar las herramientas disponibles.

Como es que tengo: Negrita, cursiva, subrayado, tachado, justificado a la izquierda, justificado a la derecha, justificado central, justificado, lista ordenada, lista desordenada, sangría, Outdent, enlace, desvinculación y creador / editor de tablas.

Solo necesito Bold, Italic, Underline, Ordered List, Unordered List, Indent, Outdent, Link, Unlink y Table creator / editor.

¿Cómo logro esto? ... Tenga en cuenta que he tenido que usar el data-role = "editor" método como el área de texto si dentro de una plantilla de editor de kendo.

Respuestas

1 para la respuesta № 1

Solo establece el herramientas opciones

Parece que estás usando MVVM, así que probablemente puedas configurarlo para que sea como:

<textarea name="description" class="k-textbox"
data-role="editor"
data-tools="["bold", "italic", "underline", "insertOrderedList", "insertUnorderedList", "indent", "outdent", "createLink", "unlink", "createTable", "addColumnLeft", "addColumnRight", "addRowAbove", "addRowBelow", "deleteRow", "deleteColumn"]"
data-bind="value:description"></textarea>

1 para la respuesta № 2

Usando el área de texto se insertará un iframe. Puedes usar div en lugar de eso. En ambos casos podemos manipular herramientas en el editor como

                    <div id="topEditor"></div>
<div class="column"></div>



$("#topEditor").kendoEditor({
tools: [
"bold",
"italic",
"underline",
"strikethrough",
"justifyLeft",
"justifyCenter",
"justifyRight",
"justifyFull",
"createLink",
"unlink",
"insertImage",
"createTable",
"addColumnLeft",
"addColumnRight",
"addRowAbove",
"addRowBelow",
"deleteRow",
"deleteColumn",
"foreColor",
"backColor"
]
});

$(".column").kendoEditor({
tools: [
"bold",
"italic",
"underline",
"createLink",
"unlink",
"insertImage"
]
});