How can I remove a specific tool/button from Kendo Editor control?
Actually, I just want to remove Insert image
button from Kendo Editor(all tools) control.
@(Html.Kendo().Editor()
.Name("editor")
.Tools(tools => tools.SubScript().SuperScript().ViewHtml())
)
Any ideas?
attr('contenteditable', false);
Kendo UI is a bundle of four JavaScript UI libraries built natively for jQuery, Angular, React and Vue. Each is built with consistent API and theming, so no matter what you choose, your UI will be modern, responsive, accessible and fast.
About Kendo UI CoreKendo UI Core is the free and open-source version of Kendo UI that provides access to the web's best UI widgets and key framework features, essential for developing great experiences for the web and mobile.
Kendo UI is a comprehensive HTML5 user interface framework for building interactive and high-performance websites and applications. It comes with a library of 110+ UI components, an abundance of data-visualization gadgets, client-side data source, and a built-in MVVM (Model-View-ViewModel) library.
Got it. Need to remove all the tools first of all, and then add each tool one by one. There is a method Clear()
for it. Here is the code.
@(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()
)
Please let me know if there is any other way of doing this.
The other way to remove the specific or all tools is by using jquery, something like this -
<script>
$(document).ready(function() {
$("#editor").kendoEditor({
value: "<p>hello there...</p>",
tools: []
});
});
</script>
and here is the Demo JS Fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With