Skip to content
Snippets Groups Projects
Commit 2a27c25a authored by chris's avatar chris
Browse files

fix unmounting editor

parent 9532614a
No related branches found
No related tags found
1 merge request!289Pm node views portals
...@@ -48,7 +48,7 @@ const Editors = () => { ...@@ -48,7 +48,7 @@ const Editors = () => {
case 'ncbi': case 'ncbi':
break; break;
default: default:
return <Editoria />; return <HHMI />;
} }
}; };
......
...@@ -13,10 +13,6 @@ import { ...@@ -13,10 +13,6 @@ import {
TableToolGroupService, TableToolGroupService,
BaseService, BaseService,
BaseToolGroupService, BaseToolGroupService,
DisplayBlockLevelService,
DisplayToolGroupService,
TextBlockLevelService,
TextToolGroupService,
DisplayTextToolGroupService, DisplayTextToolGroupService,
MathService, MathService,
FullScreenService, FullScreenService,
...@@ -87,10 +83,6 @@ export default { ...@@ -87,10 +83,6 @@ export default {
services: [ services: [
new MultipleChoiceQuestionService(), new MultipleChoiceQuestionService(),
new QuestionsToolGroupService(), new QuestionsToolGroupService(),
new DisplayBlockLevelService(),
new DisplayToolGroupService(),
new TextBlockLevelService(),
new TextToolGroupService(),
new ListsService(), new ListsService(),
new LinkService(), new LinkService(),
new InlineAnnotationsService(), new InlineAnnotationsService(),
......
...@@ -53,8 +53,7 @@ const Wax = props => { ...@@ -53,8 +53,7 @@ const Wax = props => {
const finalOnChange = schema => const finalOnChange = schema =>
debounce( debounce(
// eslint-disable-next-line no-shadow content => {
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) {
...@@ -67,10 +66,10 @@ const Wax = props => { ...@@ -67,10 +66,10 @@ const Wax = props => {
} }
if (targetFormat === 'JSON') { if (targetFormat === 'JSON') {
WaxOnchange(value); WaxOnchange(content);
} else { } else {
const serialize = serializer(schema); const serialize = serializer(schema);
WaxOnchange(serialize(value)); WaxOnchange(serialize(content));
} }
if (schema.nodes.footnote) { if (schema.nodes.footnote) {
const old = schema.nodes.footnote.spec.toDOM; const old = schema.nodes.footnote.spec.toDOM;
......
...@@ -97,6 +97,10 @@ export default props => { ...@@ -97,6 +97,10 @@ export default props => {
[readonly], [readonly],
); );
useEffect(() => {
return () => (view = null);
}, []);
const dispatchTransaction = transaction => { const dispatchTransaction = transaction => {
const { TrackChange } = props; const { TrackChange } = props;
const tr = const tr =
......
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