Hi,
Is there a way in the SfRichTextBoxAdv to insert and image but have it embedded into the document and not linked to the source file?
When the editor content is exported (or linked with a string property through MVVM) as HTML the images are linked through the <image src=""/> tag using the full path to the source file, so wonder if there is a way that the image is embedded using data instead of the file path.
Thanks in advance.
Hi David García,
In
SfRichTextBoxAdv control, we have provided an option to specify HTML export
settings. Using this event ImageNodeVisitedEvent of the HtmlImportExportSettings instance, you can
get or set the image stream and image source. But currently, we have an issue with
modifying the image source. we will validate this and update you with further
details on 21st April 2022.
As a workaround, we have created a sample application, where the image is inserted
as a stream through
InsertPicture(), and when exported as HTML, the
image is maintained as the Embedded image which can be downloaded
below,
Regards,
Kalaivannan Ganesan
Thank you for the reply back.
The workaround works for now to the purpose I want.
Hi David García,
We are glad to hear the shared workaround sample has fulfilled your requirement.
And as we promised will validate the issue ‘’Replace image path with image source on exporting as
HTML’’ and update you with further details on 21st April 2022.
Regards,
Kalaivannan Ganesan
Hi David García,
We have confirmed the issue with “Image is not embedded on modifying the image
source by ImageNodeVisitedEvent” and logged the defect report in the SfRichTextBoxAdv
control. The fix for this bug will be included in our upcoming essential studio weekly NuGet release which is
estimated to be
available on 4th May 2022.
Once the weekly NuGet is released, we will provide you with a sample
application to modify the image source and export it as an embedded image in the HTML.
Regards,
Kalaivannan Ganesan
Hi David García,
We have included the fix for mentioned “Image is not embedded on modifying the
image source by ImageNodeVisitedEvent” in our latest Weekly NuGet (v20.1.0.52). We are glad to
announce that our latest Weekly NuGet is now available. You can use that latest NuGet to get resolve this issue
at your end.
In SfRichTextBoxAdv control, we have
provided an option to specify HTML export settings. Using this event ImageNodeVisitedEvent of the HtmlImportExportSettings instance, you can get or set the
image stream and image source. On setting the image source
as Null, the inserted picture can be exported as an
Embedded image on
the HTML.
We have also prepared the same to demonstrate the same which can be downloaded
below,
Regards,
Kalaivannan Ganesan