mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
db52e6c4c0
commit
4d1e2b7344
@ -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):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user