diff --git a/editors/demo/src/Editors.js b/editors/demo/src/Editors.js index dac3414348846efed6dfe5010f4d79fc5d323b8a..774b1d788062488961e815ef274ca2a6b3850b23 100644 --- a/editors/demo/src/Editors.js +++ b/editors/demo/src/Editors.js @@ -48,7 +48,7 @@ const Editors = () => { case 'ncbi': break; default: - return <Editoria />; + return <HHMI />; } }; diff --git a/editors/demo/src/HHMI/config/config.js b/editors/demo/src/HHMI/config/config.js index d0e0640f5be2b3ee570fe83c0aab4f23c73f65a8..15b33a9e81b719ae4ef3848134a38038608b086c 100644 --- a/editors/demo/src/HHMI/config/config.js +++ b/editors/demo/src/HHMI/config/config.js @@ -13,10 +13,6 @@ import { TableToolGroupService, BaseService, BaseToolGroupService, - DisplayBlockLevelService, - DisplayToolGroupService, - TextBlockLevelService, - TextToolGroupService, DisplayTextToolGroupService, MathService, FullScreenService, @@ -87,10 +83,6 @@ export default { services: [ new MultipleChoiceQuestionService(), new QuestionsToolGroupService(), - new DisplayBlockLevelService(), - new DisplayToolGroupService(), - new TextBlockLevelService(), - new TextToolGroupService(), new ListsService(), new LinkService(), new InlineAnnotationsService(), diff --git a/wax-prosemirror-core/src/Wax.js b/wax-prosemirror-core/src/Wax.js index 0299c3f0fff67ca84940089836000a483c1f482b..fb4449b8c5e66da6a27c8a044c1b311b6b2babbb 100644 --- a/wax-prosemirror-core/src/Wax.js +++ b/wax-prosemirror-core/src/Wax.js @@ -53,8 +53,7 @@ const Wax = props => { const finalOnChange = schema => debounce( - // eslint-disable-next-line no-shadow - value => { + content => { /* HACK alter toDOM of footnote, because of how PM treats inline nodes with content */ if (schema.nodes.footnote) { @@ -67,10 +66,10 @@ const Wax = props => { } if (targetFormat === 'JSON') { - WaxOnchange(value); + WaxOnchange(content); } else { const serialize = serializer(schema); - WaxOnchange(serialize(value)); + WaxOnchange(serialize(content)); } if (schema.nodes.footnote) { const old = schema.nodes.footnote.spec.toDOM; diff --git a/wax-prosemirror-core/src/WaxView.js b/wax-prosemirror-core/src/WaxView.js index 7b417d0922d3e20567d07029124cfe7ddf88abd3..e6faf536c2680442c72c5d78084ac9279b6a2786 100644 --- a/wax-prosemirror-core/src/WaxView.js +++ b/wax-prosemirror-core/src/WaxView.js @@ -97,6 +97,10 @@ export default props => { [readonly], ); + useEffect(() => { + return () => (view = null); + }, []); + const dispatchTransaction = transaction => { const { TrackChange } = props; const tr =