This is a migrated thread and some comments may be shown as answers.

Remove the Update button from viewHtml?

3 Answers 138 Views
Editor
This is a migrated thread and some comments may be shown as answers.
KL
Top achievements
Rank 1
KL asked on 06 Oct 2020, 01:27 PM

Hi, is there a way to remove the Update button from viewHtml? We want the user to be able to edit as they please until they select view as html. We only want them to view html as read only for information purposes. Thanks.

https://dojo.telerik.com/USEwEgis

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet</title>

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.3.915/styles/kendo.default-v2.min.css"/>

    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.3.915/js/kendo.all.min.js"></script>
</head>
<body>
  
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    "bold", "italic", "underline",
                    {
                        name: "viewHtml",
                        tooltip: "View Html",
                    }
  ]
});
</script>
</body>
</html>

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 08 Oct 2020, 07:53 AM

Hello Kaming,

You can hide the update button in the viewHtml dialog using the below CSS:

.k-dialog-update{       
  display:none;
}

Let me know how that works for you.

Regards,
Martin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
KL
Top achievements
Rank 1
answered on 08 Oct 2020, 01:11 PM
Thank you for your response. However, I am not sure where to put that CSS exactly. Can you place it within the script I gave in the original post or put it in dojo for me please? Thank you.
0
Martin
Telerik team
answered on 12 Oct 2020, 08:56 AM

Hello Kaming,

Here you will find the updated Dojo example.

Let me know if you have any questions.

Regards,
Martin
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/.

Tags
Editor
Asked by
KL
Top achievements
Rank 1
Answers by
Martin
Telerik team
KL
Top achievements
Rank 1
Share this question
or