Completed
Last Updated: 23 Jun 2016 06:09 by ADMIN
ADMIN
Hristo
Created on: 17 Nov 2015 15:46
Category: RichTextEditor
Type: Bug Report
1
FIX. RadRichTextEditor - copying a FloatingImageBlock results in ArgumentNullException
Workaround:

private void CopyButton_Click(object sender, EventArgs e)
{
    this.radRichTextEditor1.Document.EnsureDocumentMeasuredAndArranged();
    if (this.radRichTextEditor1.Document.Selection.IsEmpty)
    {
        return;
    }

    string selectedText = this.radRichTextEditor1.Document.Selection.GetSelectedText();
    DocumentFragment fragmentToCopy = this.radRichTextEditor1.Document.Selection.CopySelectedDocumentElements(true);
    DataObject dataObject = new DataObject();
    if (selectedText != "")
    {
        ClipboardEx.SetText(null, selectedText, dataObject);
    }

    ClipboardEx.SetDocument(fragmentToCopy, dataObject);
    ClipboardEx.SetDataObject(dataObject);
}


(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments