get ckeditor plain text server-side from ckeditor in web forms

785 Views Asked by At

I need to retrieve the plain text value of the ckeditor html server-side from ckeditor 3.x asp.net control from asp.net web forms. I can get the HTML value in the Text element client-side but I don't seem to have access to CKEDITOR.instances.editor1.document.getBody().getText() server-side like they can in the java sdk. I've looked in the asp.net sdk control for similar named elements and only seem to find mostly configuration related elements in the asp.net control (maybe the java control is more robust than the asp.net control)

I see you can do this in javascript client side but not sure how to translate that into a get server-side like radeditor has with it's text property. Does anyone know how to get to this with the ckeditor? Thanks much for any help

1

There are 1 best solutions below

0
On

I have the same problem. Now this code works for me

$(document).ready(function () {
CKEDITOR.replace('YorFieldattachedCkEditer');

        function setValue() {

            var value = CKEDITOR.instances['YorFieldattachedCkEditer'].getData();
            alert(value);

        }
});