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 = () => {
case 'ncbi':
break;
default:
return <Editoria />;
return <HHMI />;
}
};
......
......@@ -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(),
......
......@@ -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;
......
......@@ -97,6 +97,10 @@ export default props => {
[readonly],
);
useEffect(() => {
return () => (view = null);
}, []);
const dispatchTransaction = transaction => {
const { TrackChange } = props;
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