mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 18:09:49 +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:
committed by
Ian Storm Taylor
parent
4cd1ddebd0
commit
79275d47b6
@@ -836,6 +836,7 @@ class Content extends React.Component {
|
|||||||
data-slate-editor
|
data-slate-editor
|
||||||
key={this.tmp.forces}
|
key={this.tmp.forces}
|
||||||
ref={this.ref}
|
ref={this.ref}
|
||||||
|
data-key={document.key}
|
||||||
contentEditable={!readOnly}
|
contentEditable={!readOnly}
|
||||||
suppressContentEditableWarning
|
suppressContentEditableWarning
|
||||||
className={className}
|
className={className}
|
||||||
|
@@ -59,6 +59,7 @@ function clean(html) {
|
|||||||
$.root().children().removeAttr('autocorrect')
|
$.root().children().removeAttr('autocorrect')
|
||||||
$.root().children().removeAttr('spellcheck')
|
$.root().children().removeAttr('spellcheck')
|
||||||
$.root().children().removeAttr('style')
|
$.root().children().removeAttr('style')
|
||||||
|
$.root().children().removeAttr('data-gramm')
|
||||||
|
|
||||||
return $.html()
|
return $.html()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user