|
@@ -49,6 +49,16 @@ class Document_html(BaseModel):
|
|
_dochtmlcon += _div
|
|
_dochtmlcon += _div
|
|
self.setValue(document_dochtmlcon,_dochtmlcon,True)
|
|
self.setValue(document_dochtmlcon,_dochtmlcon,True)
|
|
|
|
|
|
|
|
+ def getRichTextFetch(self,list_html):
|
|
|
|
+ _text = ""
|
|
|
|
+ for _ht in list_html:
|
|
|
|
+ if isinstance(_ht,str):
|
|
|
|
+ _text += "<div>%s</div>"%(_ht)
|
|
|
|
+ elif isinstance(_ht,dict):
|
|
|
|
+ _filemd5 = _ht.get("filemd5","")
|
|
|
|
+ _html = _ht.get("html","")
|
|
|
|
+ _text += '<div filemd5="%s">%s</div>'%(_filemd5,_html)
|
|
|
|
+ return _text
|
|
|
|
|
|
def updateAttachment(self,list_html):
|
|
def updateAttachment(self,list_html):
|
|
if len(list_html)>0:
|
|
if len(list_html)>0:
|
|
@@ -57,7 +67,8 @@ class Document_html(BaseModel):
|
|
_dochtmlcon_len = len(bytes(_dochtmlcon,encoding="utf8"))
|
|
_dochtmlcon_len = len(bytes(_dochtmlcon,encoding="utf8"))
|
|
fix_len = self.COLUMN_MAX_SIZE-_dochtmlcon_len-100
|
|
fix_len = self.COLUMN_MAX_SIZE-_dochtmlcon_len-100
|
|
|
|
|
|
- _text = '\n<div style="display:none;" class="richTextFetch">%s</div>'%("\n".join(list_html))
|
|
|
|
|
|
+ # _text = '\n<div style="display:none;" class="richTextFetch">%s</div>'%("\n".join(list_html))
|
|
|
|
+ _text = '\n<div style="display:none;" class="richTextFetch">%s</div>'%(self.getRichTextFetch(list_html))
|
|
if len(bytes(_text,encoding="utf8"))>fix_len:
|
|
if len(bytes(_text,encoding="utf8"))>fix_len:
|
|
list_t = []
|
|
list_t = []
|
|
for _html in list_html:
|
|
for _html in list_html:
|