How to apply one editor changes in another editor?
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