diff --git a/WebApplication/Editor.ascx b/WebApplication/Editor.ascx index 24d79ee..78fa590 100644 --- a/WebApplication/Editor.ascx +++ b/WebApplication/Editor.ascx @@ -49,9 +49,9 @@ function getSelectedText() { if(document.all) - var selected=iframe.document.selection.createRange().text; + var selected=iframe.document.selection.createRange().htmlText; else - var selected=iframe.document.defaultView.getSelection().getRangeAt(0); + var selected=iframe.document.defaultView.getSelection().getRangeAt(0).commonAncestorContainer.innerHTML; return selected; } diff --git a/WebApplication/Editor.ascx.designer.cs b/WebApplication/Editor.ascx.designer.cs index e92890a..5bff3ea 100644 --- a/WebApplication/Editor.ascx.designer.cs +++ b/WebApplication/Editor.ascx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4952 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------