我在读取Tiynmce中的嵌入式图像或CID时遇到问题。 我想要的是将cid转换为普通的html图像,但是我无法找到解决方案。我尝试的是将tiynmce设置为用户相对路径(true,false),转换url等,但是没有任何效果。我该如何解决这个问题? 因此,我会收到如下电子邮件内容:
<!-- [if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><!-- [if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!-- [if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"> </p>
<p class="MsoNormal">fdsafasd</p>
<p class="MsoNormal"><strong><span lang="EN-GB" style="font-size: 11.5pt; color: #002060; mso-fareast-language: BS-LATN-BA;">Ivor Pehar</span></strong></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size: 10.5pt; color: #002060; mso-fareast-language: EN-GB;">Service Delivery Department</span></p>
<p class="MsoNormal"><span style="font-size: 12.0pt; mso-fareast-language: BS-LATN-BA;"><img id="Picture_x0020_1" style="width: 3.6in; height: .0083in;" src="cid:image001.png@01D4FB89.5F2A0E30" alt="cid:image001.png@01D2A25B.6BE2B930" width="346" height="1" /></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size: 9.0pt; color: #1f497d; mso-fareast-language: BS-LATN-BA;">ZIRA R&D Center </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size: 9.0pt; color: black; mso-fareast-language: BS-LATN-BA;">tel: +387 33 610-474 | fax: +387 33 616-748 </span></p>
<p class="MsoNormal" style="margin-bottom: 12.0pt;"><span lang="EN-US" style="font-size: 9.0pt; color: black; mso-fareast-language: BS-LATN-BA;">Azize Šaćirbegović 124 | 71000 Sarajevo | BiH</span></p>
<p class="MsoNormal"><a href="http://www.zira.com.ba/"><span style="font-size: 9.0pt; color: #0563c1; mso-fareast-language: BS-LATN-BA; text-decoration: none;"><img id="Picture_x0020_2" style="width: .9083in; height: .75in;" src="cid:image002.png@01D4FB89.5F2A0E30" alt="ZIRA" width="87" height="72" border="0" /></span></a><span lang="EN-US" style="font-size: 9.0pt; color: black; mso-fareast-language: BS-LATN-BA;"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size: 9.0pt; color: black; mso-fareast-language: BS-LATN-BA;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span lang="EN-US" style="font-size: 9.0pt; color: black; mso-fareast-language: BS-LATN-BA;"><a href="http://www.zira.com.ba/disclaimer"><span style="color: black;">Legal Disclaimer</span></a></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: BS-LATN-BA;"> </span></p>
<p class="MsoNormal"> </p>
</div>
然后执行以下操作:
tinymce.EditorManager.editors[this.elementId].setContent(this.mail.messageBody, { format: 'text' });
但是当它读取图像作为签名时,我会得到如下网址:
<img width="346" height="1" style="width: 3.6in; height: .0083in;" id="Picture_x0020_1" src="cid:image001.png@01D4FB89.5F2A0E30" alt="cid:image001.png@01D2A25B.6BE2B930" data-mce-src="cid:image001.png@01D4FB89.5F2A0E30" data-mce-style="width: 3.6in; height: .0083in;">