Skip to content

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

@MrRainesE

Description

@MrRainesE

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions