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

Resize View HTML window?

1 Answer 26 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Bryan
Top achievements
Rank 1
Bryan asked on 12 Jun 2018, 03:22 PM
My users are wanting a way to enlarge or resize the window that pops up when they click the View HTML button in the Editor widget. Is there a way to do this or is beyond the developer's control? Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 14 Jun 2018, 07:56 AM
Hello Bryan,

I have provided an answer in your support ticket on the same topic. I would suggest to continue our communication there in order to prevent thread duplication.

In general, modifying the Window options could be achieved by subscribing to the Editor's execute event and then getting a reference to the active Window instance:
<style>
    .k-editor-dialog .k-editor-textarea {
        min-width: 100%;
    }
</style>
 
@(Html.Kendo().Editor()
      .Name("editor")
      .HtmlAttributes(new { style = "width: 100%;height:440px" })
      .Tools(tools => tools
          .Clear()             
          .ViewHtml()           
      )
      .Events(e => e.Execute("onExecute"))     
)
 
<script>
    function onExecute(e) {
        if (e.name == "viewhtml") {
            setTimeout(function () {
                var window = $(".k-editor-dialog").getKendoWindow();
                window.setOptions({ width: 1000 });
            });
        }
    }
</script>


Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Bryan
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or