Hello,
we're saving the whole html-content/output of the RichtTextEditor as string in our sql database.
We want to add some Images to this content. We dont use a local filesystem (blob) for saving images.
Is there a way to convert the blob
<img src="blob:http://blazor.syncfusion.com/3ab56a6e-ec0d-490f-85a5-f0aeb0ad8879">
to
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==">
In this way, we can save the images together with the html content in our database as a string.
Is that possible? Can somebody tell me how?
I found this thread for mvc, is there a way to do that in blazor?
https://www.syncfusion.com/forums/143705/how-to-save-images-as-base64-string
Thanks,
Nils
<SfRichTextEditor @ref="rteObj">
<ChildContent>
...
<RichTextEditorImageSettings SaveFormat="SaveFormat.Base64"></RichTextEditorImageSettings>
</ChildContent>
</SfRichTextEditor> |
That worked for me, thanks!!
Is there support for multiple images in the same RichTextEditor?
I tried it based on the example you provided and it does not seem to support more than one image in the RichTextEditor.
let's see what the syncfusion team has to say about it :)
Hey Gunasekar,
i think u have to validating Frank's query, on my point its all fine :)
Hi Nils,
As I'd feared, there's some kind of limit on the size of images that can be inserted into the RichTextEditor when the save format is specified as Base64. Trying to insert an image beyond a certain size causes the upload bar to stop at a certain point. Is this a browser memory issue, or something to do with a limit on the component? How can the limit(s) be raised programmatically?
args.cancel=true
if you need to prevent the image uploading. Thanks,
Gunasekar, that would explain it. Is there no way to raise the limit then?
Incidentally, I had to hunt this topic down again - surprisingly I don't see an obvious to see to see which posts I've commented on, or a way to get email notifications of replies. Is there a way?
I should add that I noticed another problem. When inserting an image, using the Browse to upload a file causes a mysterious crash. No clear exceptions thrown. Dragging/dropping doesn't do that.