Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image tag src,height and width are undefined after conversion #121

Open
MrRainesE opened this issue Jul 7, 2023 · 0 comments
Open

image tag src,height and width are undefined after conversion #121

MrRainesE opened this issue Jul 7, 2023 · 0 comments

Comments

@MrRainesE
Copy link

MrRainesE commented Jul 7, 2023

What am i doing wrong?

content state:
{"blocks":[{"key":"1qgq4","text":"","type":"unstyled","depth":0,"inlineStyleRanges":[],"entityRanges":[],"data":{}},{"key":"o1rg","text":" ","type":"atomic","depth":0,"inlineStyleRanges":[],"entityRanges":[{"offset":0,"length":1,"key":0}],"data":{}},{"key":"9kv7b","text":"","type":"unstyled","depth":0,"inlineStyleRanges":[],"entityRanges":[],"data":{}}],"entityMap":{"0":{"type":"IMAGE","mutability":"IMMUTABLE","data":{"url":"https://png.pngtree.com/png-clipart/20190611/original/pngtree-wolf-logo-png-image_2306634.jpg"}}}}

after draftTohtml conversion:
img src="undefined" alt="undefined" style="height: undefined;width: undefined

Hereby a codesanbox
https://codesandbox.io/s/mui-rte-demo-forked-wn4ym6?file=/src/App.tsx

@MrRainesE MrRainesE changed the title image tag src is undefined image tag src,height and width are undefined after conversion Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant