Skip to content
Snippets Groups Projects
Commit 9532614a authored by chris's avatar chris
Browse files

rebase into current master

parent 7ea32914
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 <HHMI />;
return <Editoria />;
}
};
......
......@@ -18,20 +18,9 @@ import { PortalContext } from './PortalContext';
import transformPasted from './helpers/TransformPasted';
import WaxOptions from './WaxOptions';
let previousDoc;
export default props => {
const {
readonly,
onBlur,
options,
debug,
autoFocus,
user,
targetFormat,
nodeViews,
} = props;
const WaxPortals = ComponentPlugin('waxPortals');
let previousDoc;
let view;
export default props => {
const { readonly, onBlur, debug, autoFocus, user, targetFormat } = props;
......@@ -131,11 +120,13 @@ export default props => {
'main',
);
}
if (targetFormat === 'JSON') {
props.onChange(schema)(state.doc.toJSON());
if (view.state.doc !== previousDoc || tr.getMeta('forceUpdate'))
props.onChange(schema)(state.doc.toJSON());
} else {
props.onChange(schema)(state.doc.content);
// eslint-disable-next-line no-lonely-if
if (view.state.doc !== previousDoc || tr.getMeta('forceUpdate'))
props.onChange(schema)(state.doc.content);
}
};
......
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