tinymce / tinymce-react

Offical TinyMCE React component
MIT License
959 stars 156 forks source link

@tinymce/tinymce-react cannot read data base64 in tag <img> #426

Closed duongquocphu closed 1 year ago

duongquocphu commented 1 year ago

i use"@tinymce/tinymce-react": "^4.2.0" and "tinymce": "^6.3.1"

In the code i add content is something like : content = <img height="117" width="497" alt="image.png" src="data:application/png;base64,iVBORw0KGgoAAAA..."> but when i check elements in the F12 the result is missing attribute src and dosen't show the image <img height="117" width="497" alt="image.png"

`

`
exalate-issue-sync[bot] commented 1 year ago

Ref: INT-3084

kundanbasha commented 1 year ago

what is meant by Ref: INT-3084?

kundanbasha commented 1 year ago

@Quocphu123 could you please tell me? how did you fix this issue?

tiny-james commented 1 year ago

what is meant by Ref: INT-3084?

That's a bot which creates a ticket in Jira for us to track this issue. It posts the Jira code here so when we look at the issue directly we can find the related ticket. So in other words just ignore it. :smile:

kundanbasha commented 1 year ago

@tiny-james could you please share the solution?

duongquocphu commented 1 year ago

@kundanbasha It turn out @tinymce/tinymce-react could read data base64 , the problem is in the data. In my case i just replace the "data:application" to "data:image" and problem solved

imgUrl = imgUrl.replace(/application/g, "image")