Edit metadata dialog: When pasting in copied text into the comments area, you can now choose to discard all formatting. Right click on the comments area and select 'Paste and Match style' which will paste the copied text as plain text formatted in the current style.

This commit is contained in:
Kovid Goyal 2013-02-25 10:38:30 +05:30
parent 9d8a89d6e5
commit 6e2718c02a

View File

@ -327,6 +327,13 @@ class EditorWidget(QWebView): # {{{
else:
return QWebView.keyReleaseEvent(self, ev)
def contextMenuEvent(self, ev):
menu = self.page().createStandardContextMenu()
paste = self.pageAction(QWebPage.Paste)
for action in menu.actions():
if action == paste:
menu.insertAction(action, self.pageAction(QWebPage.PasteAndMatchStyle))
menu.exec_(ev.globalPos())
# }}}