views:

324

answers:

2

I am using HtmlEditor from AjaxControlToolkit.

how can I get the text that I type in the editor into a div. I want to show whatever is typed as a preview message. I do not want to use the preview that comes with the HtmlEditor.

I am using a normal html button to do preview again.

Can someone please help

A: 

This javascript will get the contents of the editor:

function getEditorText() {
    var editor = $find('myHTMLEditor');

    return editor.get_content();
}
Avitus
Thank you so much for the reply.where and how should I call this getEditorText()
I would call it on click of a button to show you the preview.
Avitus
how do I assign the function return value to a label using jquery
I get an error saying null is null or not an object. I am stuck. Please help :(
A: 

can someone please answer.

It's very urgent

related questions