mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Use same code for initializing CC comments editor as for builtin comments editor
This commit is contained in:
parent
c58e7eb2e8
commit
f11ab7d0c3
@ -234,9 +234,12 @@ class Comments(Base):
|
|||||||
self.widgets = [self._box]
|
self.widgets = [self._box]
|
||||||
|
|
||||||
def setter(self, val):
|
def setter(self, val):
|
||||||
if val is None:
|
if not val or not val.strip():
|
||||||
val = ''
|
val = ''
|
||||||
self._tb.html = comments_to_html(val)
|
else:
|
||||||
|
val = comments_to_html(val)
|
||||||
|
self._tb.html = val
|
||||||
|
self._tb.wyswyg_dirtied()
|
||||||
|
|
||||||
def getter(self):
|
def getter(self):
|
||||||
val = unicode(self._tb.html).strip()
|
val = unicode(self._tb.html).strip()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user