- function getSelectedHTML()
- {
- var rng=null,html="";
- var editdoc = editor1.GetDocument();
- var editwin = editor1.GetWindow();
- if (document.selection && document.selection.createRange)
- {
- rng=editdoc.selection.createRange();
- if( rng.htmlText )
- {
- html=rng.htmlText;
- }
- else if(rng.length >= 1)
- {
- html=rng.item(0).outerHTML;
- }
- }
- else if (window.getSelection)
- {
- rng=editwin.getSelection();
- if (rng.rangeCount > 0 && window.XMLSerializer)
- {
- rng=rng.getRangeAt(0);
- html=new XMLSerializer().serializeToString(rng.cloneContents());
- }
- }
- return html;
- }
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx