What's the correct way to Force Open Link in new Window in the Editor component?

1 Answer 444 Views
Editor
Randy
Top achievements
Rank 1
Iron
Randy asked on 08 Jul 2021, 04:19 PM

I'm working with the Editor component (https://www.telerik.com/kendo-react-ui/components/editor/) .

If a user creates a link, I need to enforce all links open in a new window. By default it's a checkbox that isn't checked.

I haven't found a way to accomplish this yet. I'd like to either check and disable the checkbox or even not show it at all, but still have it enabled.

I also tried using the custom rendering (https://www.telerik.com/kendo-react-ui/components/editor/custom-rendering/) but it seems to all be tucked inside the content var.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 12 Jul 2021, 10:24 AM

Hello,

Here is how it can be achieved: https://stackblitz.com/edit/react-vkxmau?file=app%2Fmain.jsx.

The content variable is a component containing the dialog content and modifying the input is not straightforward. I also override the default ctrl+k key binding because it will open the built-in dialog instead of the custom.

I hope that helps.

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Editor
Asked by
Randy
Top achievements
Rank 1
Iron
Answers by
Nikolay
Telerik team
Share this question
or