Articles in this section
Category / Section

How to apply one editor changes in another editor?

1 min read

Description

You can apply the one editor changes in another editor by using the “setHtml” public method in RTE.

Solution

To apply the changes of one editor in another editor by getting the formatted (ex: bold, italic) value of 1st RTE in the change event argument and set that value to the 2nd RTE by using the “setHtml” method. This as illustrated in the following code example.

 

JavaScript

<script> 

     

    var rteObj; 

    $(function () { 

 

        $("#rteSample").ejRTE({ 

            width: "100%", minWidth: "150px", 

            change: "change"

        }); 

        $("#rteSample1").ejRTE({ 

            width: "100%", minWidth: "150px" 

        }); 

        rteObj = $("#rteSample1").ejRTE("instance"); 

    }); 

    function change(args) { 

        rteObj.setHtml(args.htmlText); 

    }  

</script> 

 

 

Sample Link:

 

https://jsplayground.syncfusion.com/un2kny4a

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied