I thing there are two issues here:
- draft-js-utils version is too low. It only support "src" and "alt" for
in 0.2.0.
ImageSpan doesn't handle width and height type properly.
For example: <img width="100" height="100"/> will resolve into const imageStyle = {width: '100', height: '100'} in ImageSpan, and it will be ignored by react.
And <img width="100px" height="100px"/> will resolve into const imageStyle = {backgroundSize: '100pxpx 100pxpx'}, which is also invalid.
I thing there are two issues here:
ImageSpandoesn't handle width and height type properly.For example:
<img width="100" height="100"/>will resolve intoconst imageStyle = {width: '100', height: '100'}inImageSpan, and it will be ignored by react.And
<img width="100px" height="100px"/>will resolve intoconst imageStyle = {backgroundSize: '100pxpx 100pxpx'}, which is also invalid.