Currently the API allows ClipboardHandler-s to be registered in ClipboardEx.ClipboardHandlers collection, which is used when content is pasted.
We can extend ClipboardHandler with property describing whether the handler is supported for copy, paste, or copy&paste, and use the collection for copy operation as well.
Workaround: Use RadRichTextBox.CommandExecuted and on copy, enhance the original data object in the clipboard:
this.radRichTextBox.CommandExecuted += (sender, e) =>
{
if (e.Command is CopyCommand)
{
var originalDataObject = Clipboard.GetDataObject();
DataObject dataObject = new DataObject();
foreach (string format in originalDataObject.GetFormats())
{
dataObject.SetData(format, originalDataObject.GetData(format));
}
dataObject.SetData("Html", new HtmlFormatProvider().Export(this.radRichTextBox.Document));
Clipboard.SetDataObject(dataObject);
}
};