Skip to content
Snippets Groups Projects
Commit 07c7ce89 authored by chris's avatar chris
Browse files

render all nodes

parent 17232e70
No related branches found
No related tags found
1 merge request!296Feedback editor
...@@ -183,7 +183,7 @@ const Hhmi = () => { ...@@ -183,7 +183,7 @@ const Hhmi = () => {
config={config} config={config}
autoFocus autoFocus
fileUpload={file => renderImage(file)} fileUpload={file => renderImage(file)}
value="" value={initialValue}
targetFormat="JSON" targetFormat="JSON"
// readonly // readonly
layout={HhmiLayout} layout={HhmiLayout}
......
...@@ -60,7 +60,6 @@ const Question = styled.div` ...@@ -60,7 +60,6 @@ const Question = styled.div`
`; `;
export default ({ node, view, getPos }) => { export default ({ node, view, getPos }) => {
console.log(node);
const context = useContext(WaxContext); const context = useContext(WaxContext);
const [showExplanation, setShowExplanation] = useState(false); const [showExplanation, setShowExplanation] = useState(false);
const [explanationValue, setExplanationValue] = useState(''); const [explanationValue, setExplanationValue] = useState('');
......
const multipleChoiceNode = { const multipleChoiceNode = {
group: 'inline', group: 'inline',
content: 'inline*', content: 'block*',
inline: true, inline: true,
// atom: true, // atom: true,
attrs: { attrs: {
......
...@@ -27,16 +27,18 @@ export default props => { ...@@ -27,16 +27,18 @@ export default props => {
decorations, decorations,
context, context,
) => { ) => {
setPortal({ setTimeout(() => {
...portal, setPortal({
id: uuidv4(), ...portal,
element, id: uuidv4(),
component, element,
node, component,
view, node,
getPos, view,
decorations, getPos,
context, decorations,
context,
});
}); });
}, },
}); });
......
...@@ -30,6 +30,7 @@ export default () => { ...@@ -30,6 +30,7 @@ export default () => {
portals.map(({ dom, component: Component, id }) => { portals.map(({ dom, component: Component, id }) => {
return ReactDOM.createPortal( return ReactDOM.createPortal(
<Component <Component
key={id}
decorations={decorations} decorations={decorations}
getPos={getPos} getPos={getPos}
node={node} node={node}
......
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