diff --git a/editors/editoria/src/Editoria.js b/editors/editoria/src/Editoria.js index ef823aeea687d8da82430783ebd5bb28329c704f..ac044d84711603ed4e844f5cda8594ac528224cd 100644 --- a/editors/editoria/src/Editoria.js +++ b/editors/editoria/src/Editoria.js @@ -52,7 +52,7 @@ const Editoria = () => ( // value={`<p class="paragraph">This is the first paragraph</p><p class="paragraph">This is the second paragraph</p><p class="author">This is an author</p>`} layout={EditoriaLayout} // debug - // onChange={source => console.log(source)} + onChange={source => console.log(source)} user={user} /> </Fragment> diff --git a/wax-prosemirror-schema/src/nodes/footNoteNode.js b/wax-prosemirror-schema/src/nodes/footNoteNode.js index 711e454440245725b627d3dabd9fbb5deb96a7bb..b28376b693c2983f0c050c71591c021f463908aa 100644 --- a/wax-prosemirror-schema/src/nodes/footNoteNode.js +++ b/wax-prosemirror-schema/src/nodes/footNoteNode.js @@ -4,16 +4,19 @@ const getHTMLString = node => { if (textContent) { let strContent = textContent; - for (let i = 0; i < node.content.content[0].marks.length; i += 1) { - const mark = node.content.content[0].marks[i]; - const { type: markType } = mark; - const domDetails = markType.spec.toDOM(mark); - const htmlAttrs = Object.keys(domDetails[1]).reduce( - (str, key) => `${str}${key}="${domDetails[1][key]}"`, - '', - ); - const htmlTag = domDetails[0]; - strContent = `<${htmlTag} ${htmlAttrs}>${strContent}</${htmlTag}>`; + for (let i = 0; i < node.content.content.length; i += 1) { + for (let j = 0; j < node.content.content[i].marks.length; j += 1) { + const mark = node.content.content[i].marks[j]; + + const { type: markType } = mark; + const domDetails = markType.spec.toDOM(mark); + const htmlAttrs = Object.keys(domDetails[1]).reduce( + (str, key) => `${str}${key}="${domDetails[1][key]}"`, + '', + ); + const htmlTag = domDetails[0]; + strContent = `<${htmlTag} ${htmlAttrs}>${strContent}</${htmlTag}>`; + } } return strContent; }