2 Answers, 1 is accepted
You can hide the toolbar container in editor by using the 'k-editor-toolbar' class.
$(
'.k-editor-toolbar'
).hide();
In the linked Dojo example the toolbar is hidden if the Editor is disabled. the toolbar is again visible if the Editor is enabled.
Regards,
Neli
Progress Telerik
Here is the Dojo code which demonstrates how to hide/show an Editor toolbar.
<input type=
"button"
class=
"k-button"
value=
"Disable"
onclick=
"setzIndex(2)"
>
<input type=
"button"
class=
"k-button"
value=
"Enable"
onclick=
"setzIndex(0)"
>
<div id=
"content"
>
<textarea id=
"editor"
rows=
"10"
cols=
"30"
style=
"width:740px;height:440px"
></textarea>
</div>
<script>
function
setzIndex(index){
if
(index == 2){
$(
'.k-editor-toolbar'
).hide();
}
else
{
$(
'.k-editor-toolbar'
).show();
}
}
$(document).ready(
function
() {
// create Editor from textarea HTML element with default set of tools
$(
"#editor"
).kendoEditor();
});
</script>
Looking forward to your reply.
Regards,
Petar
Progress Telerik
Hi Saby,
If you need to disable the Editor tools, you could for example add the "disabled" attribute for all the buttons, using the $(".k-button.k-tool'') selector. For the dropdowns, you could set the 'pointer-events" to 'none'. Below is an example:
<div id="content">
<textarea id="editor" rows="10" cols="30" style="width:740px;height:440px"></textarea>
</div>
<script>
$(document).ready(function() {
$("#editor").kendoEditor();
$(".k-button.k-tool").attr("disabled", "disabled")
$("span.k-editor-dropdown").css("pointer-events", "none");
});
</script>
And a Dojo example with a code above is linked here.
I hope the above will help you to resolve the issue.
Regards,
Neli
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello Neli, thank you for your answer.
Please tell me if I can force the textarea with kendo so that what is copied and pasted displays with the 'Roboto' font family.
Thanks
Hello Saby,
You could customize the font in the Editor editable area by using the stylesheet option and set the needed font to the body element.
You could take a look at the Editor Styles Demo linked below:
- https://demos.telerik.com/kendo-ui/editor/styles
I hope this helps.
Regards,
Neli
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Thank you for your answer, Neli.
Please help me with this:
the table wizard lightbox comes out with an error in the dimensions. I have tried with the new versions (2020.3.1118) and the error persists. There is inconsistency with the kendo.common.min.css file. If I put that, the tool icons disappear. Thanks for your help
Hi Saby,
I have tested the appearance of the Table Wizard of the Editor in our Demos. On the screencast linked here, you could see the appearance on my end. Could you please double-check if there are some custom styles in your project that are overwriting the default styles and that might lead to an unexpected appearance? If the issue is not caused by custom style could you please provide more details - does the issue occurs in all browsers? Could you please let me know if the Table Wizard is rendered as expected when you open our Demos?
Regarding adding Roboto font to the fonts DropDownList, we have such a How-To article that describes how the Google WebFonts could be added to the Kendo Editor fonts dropdown. You could use the same approach with the 'Roboto'.
I hope the provided article will be helpful.
Regards,
Neli
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.