1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 01:50:06 +02:00

Add "data-key" to root div for the whole document (#759)

* Add "data-key" to div for the whole document

* Fix unit tests for rendering
This commit is contained in:
Samy Pessé
2017-04-28 21:17:23 +02:00
committed by Ian Storm Taylor
parent 4cd1ddebd0
commit 79275d47b6
2 changed files with 2 additions and 0 deletions

View File

@@ -836,6 +836,7 @@ class Content extends React.Component {
data-slate-editor
key={this.tmp.forces}
ref={this.ref}
data-key={document.key}
contentEditable={!readOnly}
suppressContentEditableWarning
className={className}

View File

@@ -59,6 +59,7 @@ function clean(html) {
$.root().children().removeAttr('autocorrect')
$.root().children().removeAttr('spellcheck')
$.root().children().removeAttr('style')
$.root().children().removeAttr('data-gramm')
return $.html()
}