This commit is contained in:
Kovid Goyal 2012-06-20 20:22:19 +05:30
parent db52e6c4c0
commit 4d1e2b7344

View File

@ -116,6 +116,9 @@ class EditorWidget(QWebView): # {{{
ss = extra_shortcuts.get(wac, None)
if ss:
ac.setShortcut(QKeySequence(getattr(QKeySequence, ss)))
if wac == 'RemoveFormat':
ac.triggered.connect(self.remove_format_cleanup,
type=Qt.QueuedConnection)
self.action_color = QAction(QIcon(I('format-text-color')), _('Foreground color'),
self)
@ -227,6 +230,9 @@ class EditorWidget(QWebView): # {{{
js = 'document.execCommand("%s", false, null);' % cmd
frame.evaluateJavaScript(js)
def remove_format_cleanup(self):
self.html = self.html
@dynamic_property
def html(self):