when the user pastes XML text in the editor, I want to check whether the pasted text (or the new content of the editor) contains the “xmlns” attribute. If it is missing, I want to add it.
There is no callback/event to be notified after a paste operation.
So, I thought about hiding the default “Paste” menu item and replacing it with my own “Paste” item. But it is also hard to identify the menu items - I could search them in “SytaxEdit.DefaultMenu” by comparing the ToolStripMenuItem texts.
So I suggest either
- a virtual method “OnPasted” and/or an event “Pasted” - same for the other menu items
- properties to access the default menu items
Would it be possible to add any of those two suggestions?