How to convert the RadEditor content to image

528 views Asked by At

I have a radeditor,in that i have spans and a background image.I have some html input textboxes,on text changed of the textboxes,i'm binding the text to particular spans like:

            <script>
            function txtTitlechanged(x) {
           var y = document.getElementById(x).value
           var editor = $find("<%=RadEditor1.ClientID %>");
           var oDocument = editor.get_document()
           var img = oDocument.getElementById('span1');
            if (y == '') {
              img.innerHTML = 'UserName';
           }
           else {
              img.innerHTML = y;
          }
        }
     </script>

     <input type='text' onchage="txtTitlechanged" />

Here i want that radeditor content as an image,i'm getting the radeditor content as html,but i want as it as an image.

1

There are 1 answers

0
Rumen Jekov On

You could search for a third party HTMLtoImage or XHTMLtoImage convertor and provide the generated content to it OR export the content to PDF using the built-in PDF exporting feature of RadEditor: http://demos.telerik.com/aspnet-ajax/editor/examples/pdfexport/defaultcs.aspx