Skip to content
Snippets Groups Projects
Commit 4412a2ac authored by chris's avatar chris
Browse files

after save change back

parent c7f38c5a
No related branches found
No related tags found
1 merge request!168Fix rerender notes
...@@ -94,7 +94,7 @@ const Wax = props => { ...@@ -94,7 +94,7 @@ const Wax = props => {
const finalOnChange = debounce( const finalOnChange = debounce(
value => { value => {
/* HACK alter toDOM of footnote, because of how PM treats inline nodes /*HACK alter toDOM of footnote, because of how PM treats inline nodes
with content */ with content */
if (schema.nodes.footnote) { if (schema.nodes.footnote) {
const old = schema.nodes.footnote.spec.toDOM; const old = schema.nodes.footnote.spec.toDOM;
...@@ -106,6 +106,14 @@ const Wax = props => { ...@@ -106,6 +106,14 @@ const Wax = props => {
const serialize = serializer(schema); const serialize = serializer(schema);
WaxOnchange(serialize(value)); WaxOnchange(serialize(value));
if (schema.nodes.footnote) {
const old = schema.nodes.footnote.spec.toDOM;
schema.nodes.footnote.spec.toDOM = function (node) {
old.apply(this, arguments);
return ['footnote', node.attrs];
};
}
}, },
1000, 1000,
{ maxWait: 5000 }, { maxWait: 5000 },
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment