Skip to content

width and height attribute doesn't work for img #388

@xiaohanzhang

Description

@xiaohanzhang

I thing there are two issues here:

  1. draft-js-utils version is too low. It only support "src" and "alt" for in 0.2.0.
  2. 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.

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