This is a migrated thread and some comments may be shown as answers.

HTMLDataProvider and Gif files

1 Answer 108 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 01 Sep 2011, 04:36 PM
Hi, I am having trouble with the htmldataprovider and GIF Files:

When I insert a gif picture, export it as HTML, and reimport it again, then the Picture is gone, but the placeholder (empty white space) is still there, The exported HTML contains the GIF-ImageData so the export is working correctly, but the import just wont reimport it, and the next time you export the reimported HTML, the <img> is then lost.

The first export:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
.p_A215EAA9 { margin: 0px 0px 20px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_79B9C72D { font-family: 'Calibri';font-style: Normal;font-weight: normal;font-size: 16px;color: #000000; }
</style></head><body><p class="p_A215EAA9"><img width="12" height="14" src="data:image/gif;base64,R0lGODlhDAAOAPcAAAAAAAAAMwAAZgAAmQAAzAAA/wArAAArMwArZgArmQArzAAr/wBVAABVMwBVZgBVmQBVzABV/wCAAACAMwCAZgCAmQCAzACA/wCqAACqMwCqZgCqmQCqzACq/wDVAADVMwDVZgDVmQDVzADV/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMrADMrMzMrZjMrmTMrzDMr/zNVADNVMzNVZjNVmTNVzDNV/zOAADOAMzOAZjOAmTOAzDOA/zOqADOqMzOqZjOqmTOqzDOq/zPVADPVMzPVZjPVmTPVzDPV/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YrAGYrM2YrZmYrmWYrzGYr/2ZVAGZVM2ZVZmZVmWZVzGZV/2aAAGaAM2aAZmaAmWaAzGaA/2aqAGaqM2aqZmaqmWaqzGaq/2bVAGbVM2bVZmbVmWbVzGbV/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5krAJkrM5krZpkrmZkrzJkr/5lVAJlVM5lVZplVmZlVzJlV/5mAAJmAM5mAZpmAmZmAzJmA/5mqAJmqM5mqZpmqmZmqzJmq/5nVAJnVM5nVZpnVmZnVzJnV/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wrAMwrM8wrZswrmcwrzMwr/8xVAMxVM8xVZsxVmcxVzMxV/8yAAMyAM8yAZsyAmcyAzMyA/8yqAMyqM8yqZsyqmcyqzMyq/8zVAMzVM8zVZszVmczVzMzV/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8Amf8AzP8A//8rAP8rM/8rZv8rmf8rzP8r//9VAP9VM/9VZv9Vmf9VzP9V//+AAP+AM/+AZv+Amf+AzP+A//+qAP+qM/+qZv+qmf+qzP+q///VAP/VM//VZv/Vmf/VzP/V////AP//M///Zv//mf//zP///wAAAAAAAAAAAAAAACH5BAEAAPwALAAAAAAMAA4AAAhmALNJy5YK2zSBr6YZnPbKYMNU2bBBfOUq27SKBRNieyWNocFsBLO5OpgNlcWKJj9yJCjxJESTGl8hjOjxIERpMmEOhNhyZEmQBS9azLayYMifPiv+xGmzpVGGCleKbCrUI8+CqQICADs=" /><span class="s_79B9C72D" /></p></body></html>

second after reimport:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
.p_A215EAA9 { margin: 0px 0px 20px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_E6FD2046 { font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px;color: #000000; }
</style></head><body><p class="p_A215EAA9"><span class="s_E6FD2046" /></p></body></html>

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 06 Sep 2011, 07:43 PM
Hello Alexander,

GIF images are not supported as sources to the ImageInline elements in RadDocument. Therefore, the image is not imported correctly and is visible only as a placeholder. However, at the time of the import, its src property is used to try to show the image and is no longer kept track of. Thus, when you export the document, the image does not contain information of its UriSource or RawData and is not included in the resulting HTML file.
We will bring up this issue for discussion, but we have not planned a review of the way the format provider regards elements it does not recognize for now.

Best wishes,
Iva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
RichTextBox
Asked by
Alexander
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or