We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When edited prevent actions

Thread ID:





143854 Apr 8,2019 09:11 AM UTC Apr 9,2019 05:57 AM UTC ASP.NET MVC 1
Tags: RichTextEditor
Asked On April 8, 2019 09:11 AM UTC

Is it possible to display some alert, confirm or syncfusion dialog while rte was edited and user try to redirect from page or clicked to open other tab?
Thank you

Prince Oliver [Syncfusion]
Replied On April 9, 2019 05:57 AM UTC

Hi Mihael,  
Thanks for contacting us. 
Yes , you can display confirmation dialog through change event of RTE, when RTE is edited and its value is changed. If you wish you to check for certain keypress and display a confirmation dialog , then you can perform this using keyDown event of RTE. Kindly refer the following code. 
            The Rich Text Editor (RTE) control is an easy to render in 
            client side. Customer easy to edit the contents and get the HTML content for 
            the displayed content. A rich text editor control provides users with a toolbar 
            that helps them to apply rich text formats to the text entered in the text 
        <a rel='nofollow' href="https://mvc.syncfusion.com/demos/web/rte/default" >Demo link for RTE </a> 
    function onChange(args) { 
    function onKeyDown(args) { 
        if (args.keyCode == 17) { 
            var check = confirm("Please click OK for navigation to demo page.") 
            if (check) 
                window.location = "https://mvc.syncfusion.com/demos/web/rte/default"; 
We have attached a sample for your reference, please find the sample at the following location: 
For further reference on the available events in RTE, please refer the following UG document 
Note: In our sample, we have just displayed a confirmation dialog to show alert before navigating from the anchor link. You can also render our Syncfusion Dialog with required content for this case and show or hide through show/hide methods based on the requirement. Kindly refer to the below UG documentation links: 
Let us know if you need any further assistance on this. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon