Editor widget resize View Html

0 Answers 34 Views
Editor
sudo
Top achievements
Rank 1
sudo asked on 25 Oct 2023, 12:26 PM

Hi,

I'd like to know if it's possible to resize the View HTML popup window on the Editor widget? I've tried to hook an execute function I created in TypeScript to the ViewHtml event on the toolbar but I keep getting an undefined when trying to grab the window.


 @(Html.Kendo().EditorFor(a => Description)
                    .Tag("div")
                    .PasteCleanup(p => p
                    .MsTags(true)
                    .MsConvertLists(true)
                    .MsAllFormatting(false))
                    .Tools(tools => tools
                        .ViewHtml()
                    )
                    .Events(e => e.Execute("CareerAds.onViwHtmlExecute")))

export function onViwHtmlExecute(e) {
        console.log(e.name);
        if (e.name == "viewhtml") {
            let window = $(".k-editor-dialog").data("kendoWindow");
            console.log(window);
            window.setOptions({ width: 1000 });
        }
    }

window is always undefined and I'm struggling to figure out how to actually grab a hold of the window as I can't call window.setOptions on this for obvious reasons.

 

Thanks

Ivan Danchev
Telerik team
commented on 30 Oct 2023, 11:13 AM

Hi,

You can set 1000px width to the Editor's popup dialog through CSS, see this example: https://netcorerepl.telerik.com/wxlYdabF11EMBeaF30

 

 

No answers yet. Maybe you can help?

Tags
Editor
Asked by
sudo
Top achievements
Rank 1
Share this question
or