开发者

HtmlEditor in AjaxControlToolkit

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 u开发者_运维知识库se the preview that comes with the HtmlEditor.

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

Can someone please help


This javascript will get the contents of the editor:

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

    return editor.get_content();
}


You can do the following, add a div and inside of it add the following

and then add an a tag with an id, and the runat=server

and after that you can insert the text that is in the htmleditor using the following code

string content = HtmlEditorExtender1.Content; textResult.InnerText = content

I hope this help you

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜