I want to allow some simple formatting commands in WPF RichTextBox, but not others.
I created a toolbar that allows users to use bold or italics and use bulleted or numbered lists. (Basically, I just want to support formatting commands that are suitable for a blog or wiki.)
The problem is that users can perform cut and paste operations that paste text with foreground and background colors, among other types of forbidden formatting. This can lead to unpleasant usability problems, for example, for users pasting white text on a white background.
Is there a way to disable these advanced formatting features? If not, is there a way to intercept the paste operation and format the formatting that I don't want?
source
share