Skip to content

Commit 92cc19e

Browse files
author
tighepr
committed
img.src -> img.getAttribute('src')
1 parent aaddcb9 commit 92cc19e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ coverage
1010
.DS_Store
1111
.env
1212
npm-debug.log
13+
14+
#IntelliJ
15+
.idea

dist/html-to-draftjs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/library/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function genFragment(
4444
node instanceof HTMLImageElement
4545
) {
4646
const entityConfig = {};
47-
entityConfig.src = node.src;
47+
entityConfig.src = node.getAttribute ? node.getAttribute('src') || node.src : node.src;
4848
entityConfig.height = node.style.height;
4949
entityConfig.width = node.style.width;
5050
const entityId = Entity.create(

0 commit comments

Comments
 (0)