Beispiel #1
0
        protected override bool DoInsertData(DataAction action, MarkupPointer begin, MarkupPointer end)
        {
            using (new WaitCursor())
            {
                try
                {
                    string htmlPresentation = DataMeister.LiveClipboardData.HtmlPresentation;

                    // remove document tags and scripts
                    htmlPresentation = HtmlCleaner.RemoveScripts(htmlPresentation);

                    // insert the html
                    EditorContext.InsertHtml(begin, end, htmlPresentation, null);
                    return(true);
                }
                catch (Exception e)
                {
                    //bugfix 1696, put exceptions into the trace log.
                    Trace.Fail("Exception while inserting HTML: " + e.Message, e.StackTrace);
                    return(false);
                }
            }
        }