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

Checkboxes on RichText Control

We are wanting to use the rich text box control in the hope that we can embed checkboxes for the user to check.

Whilst we've been successful in doing this, when we call getHtml() the checkbox values are not returned.

Is it possible to have the rich text control working with checkboxes?


1 Reply

AB Ashokkumar Balasubramanian Syncfusion Team May 13, 2019 05:45 AM

Hi Damien,  
Thanks for contacting Syncfusion Support.  
By default, getHtml() method of RTE will return the plain HTML content within RTE and this will not return the value of control rendered within RTE. Since RTE editor content will be rendered as Iframe, checkbox element cannot be directly tracked in DOM with normal jQuery. We suggest you get the value of checkbox by navigating with Checkbox id from RTE’s iframe as shown below 
function getValue() 
                            var check1 = $("#rteSample_Iframe").contents().find("#Checkbox1").is(":checked"); 
                              var check2 = $("#rteSample_Iframe").contents().find("#Checkbox2").is(":checked"); 
                              alert("Checkbox 1 is checked : " + check1 +" Checkbox 2 is checked:" + check2); 
We have attached a sample for your reference in the following link 
Please let us know, if you need any further assistance. 
Ashokkumar B. 

Live Chat Icon For mobile
Up arrow icon