This example demonstrates how to process images pasted as Base64 strings (for instance, images pasted from the clipboard), save them on the server, and work with the related resource links.
Follow the steps below to process images:
- Subscribe to the HtmlCorrecting event.
- In the event handler, process
img
tags that contain Base64 data. - Retrieve serialized image data from a Base64 string and convert it to an array of bytes.
- Save the array of bytes as an image file on the server and generate a client URL to the newly created file.
- Replace the
src
attribute value of the processedimg
tag with the generated client URL.