1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-21 14:41:23 +02:00

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
This commit is contained in:
WangChienChieh
2017-09-22 05:45:24 +08:00
committed by Ian Storm Taylor
parent 6f889454d0
commit 2d7642b9d3

View File

@@ -128,7 +128,7 @@ const RULES = [
type: 'link', type: 'link',
nodes: next(el.childNodes), nodes: next(el.childNodes),
data: { data: {
href: el.attrs.find(({ name }) => name == 'href').value href: el.getAttribute('href')
} }
} }
} }