From 79275d47b691e877696a61f24c6f123d9ff61db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Fri, 28 Apr 2017 21:17:23 +0200 Subject: [PATCH] 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 --- src/components/content.js | 1 + test/rendering/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/content.js b/src/components/content.js index ba9101205..544859666 100644 --- a/src/components/content.js +++ b/src/components/content.js @@ -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} diff --git a/test/rendering/index.js b/test/rendering/index.js index 550307ea3..1b0108698 100644 --- a/test/rendering/index.js +++ b/test/rendering/index.js @@ -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() }