I am trying to override the default clipboard behavior to only support pasting plain text using the following code:
This seems to work appropriately when pasting from an application such as MS Word. However, if I copy from a RadRichTextBox and then paste into the same RadRichTextBox, the formatting is preserved. How can I also paste plain text when copying from the same RadRichTextBox I am pasting into?
ClipboardEx.ClipboardHandlers.Clear();
var clipboardHandler =
new
ClipboardHandler();
clipboardHandler.ClipboardDataFormat = DataFormats.Text;
clipboardHandler.DocumentFormatProvider =
new
TxtFormatProvider();
ClipboardEx.ClipboardHandlers.Add(clipboardHandler);
This seems to work appropriately when pasting from an application such as MS Word. However, if I copy from a RadRichTextBox and then paste into the same RadRichTextBox, the formatting is preserved. How can I also paste plain text when copying from the same RadRichTextBox I am pasting into?