开发者

html Text Editor Ajax control tool kit

I am using html editor from ajax control tool kit. When i get the content its giving me an ht开发者_如何学Goml content withe all the formatting tags is it possible to get the preview content from this control. Thanks in advance


The preview is just an iframe that has been filled with the content html at the client side. There isn't really a "value" for the content other than this. If you just wanted the text you can probably parse this out of the content.

I think the content from this control is always well-formed (just did some testing here), so you can use xml:

//Load up the xml document
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.LoadXML(myHTMLEditor.Content.replace(" ","")); //Replace entities with ""

//Get all the text
string s = xml.InnerText;

Note that this won't work in general for html - just the output from this control.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜