简体   繁体   English

为什么富内容中的HTML文本将图像显示为“图形”?

[英]Why the HTML Text in Rich Content is showing image as 'Graphic'?

I am working on one project where I want to reassign a html text to a rich text control which is designed for web. 我正在一个项目中,我想将html文本重新分配给专为Web设计的RTF控件。 This rich text control support html doc to display the record. 此RTF控件支持html doc显示记录。

I am facing problem while uploading html with images as follows: 我在上传带有图片的html时遇到问题,如下所示:

<font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">Test Embedded Image </span>
<span style="font-size: 8pt; font-family: 'Arial'; color: #000000;">graphic</span>
</div>
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">Text after image sd</span>
<div><table width=538 border=1 cellpadding=0 bordercolor="#414141" cellspacing=0>
<tr valign=top>
<td width=180 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">test </span>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_1.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_2.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
</tr>
<tr valign=top>
<td width=180 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_3.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 8pt; font-family: 'Arial'; text-decoration: underline; color: #0066cc;"> xxx</span>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 8pt; font-family: 'Arial'; text-decoration: underline; color: #0066cc;"> Web URL</span>
</div>
</font>
</td>
</tr>
</table>
</div>

But the images are replaced with the graphic text as shown in fig. 但是图像被graphic文本替换,如图5所示。

屏幕截图1屏幕截图2

Can anyone tell me why this is happening? 谁能告诉我为什么会这样吗?

The alt tag in img is set as graphic . imgalt标签设置为graphic It will show only if those images can't be found. 仅在找不到这些图像时才会显示。
Check the images if they are in right directory. 检查图像是否在正确的目录中。

It's working in the FIDDLE here . 它在FIDDLE中工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM