Skip to content
Snippets Groups Projects
Commit 3b95078b authored by chris's avatar chris
Browse files

return component

parent 62cc09c2
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,9 @@ const EditorComponent = ({ node, view, getPos }) => { ...@@ -50,6 +50,9 @@ const EditorComponent = ({ node, view, getPos }) => {
app, app,
pmViews: { main }, pmViews: { main },
} = context; } = context;
const { testMode, showFeedBack } = main.props.customValues;
let gapView; let gapView;
const questionId = node.attrs.id; const questionId = node.attrs.id;
const isEditable = main.props.editable(editable => { const isEditable = main.props.editable(editable => {
...@@ -156,15 +159,15 @@ const EditorComponent = ({ node, view, getPos }) => { ...@@ -156,15 +159,15 @@ const EditorComponent = ({ node, view, getPos }) => {
}; };
return ( return (
<> isEditable ||
{isEditable || (!isEditable && !main.props.customValues.testMode) ? ( (!isEditable && !testMode && !showFeedBack && (
<EditorWrapper> <EditorWrapper>
<div ref={editorRef} /> <div ref={editorRef} />
</EditorWrapper> </EditorWrapper>
) : ( )) ||
<InputComponent getPos={getPos} node={node} view={view} /> (showFeedBack && !testMode && <span>hello</span>) || (
)} <InputComponent getPos={getPos} node={node} view={view} />
</> )
); );
}; };
......
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