From 2d7642b9d32837d50fefb290cbdfdff1fcf2c5bd Mon Sep 17 00:00:00 2001 From: WangChienChieh Date: Fri, 22 Sep 2017 05:45:24 +0800 Subject: [PATCH] Pasting external HTML does not work with Slate example. (#1129) (#1146) * Pasting external HTML does not work with Slate example. (#1129) *Due to the upgrade of slate, adjust the way of el.attrs.find to el.href. * Update index.js --- examples/paste-html/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/paste-html/index.js b/examples/paste-html/index.js index 355ecb42b..d5fb2fb41 100644 --- a/examples/paste-html/index.js +++ b/examples/paste-html/index.js @@ -128,7 +128,7 @@ const RULES = [ type: 'link', nodes: next(el.childNodes), data: { - href: el.attrs.find(({ name }) => name == 'href').value + href: el.getAttribute('href') } } }