diff --git a/wax-questions-service/src/MultipleDropDownService/components/ContainerEditor.js b/wax-questions-service/src/MultipleDropDownService/components/ContainerEditor.js index 8fddffb74b1c931b54c7e762716648591a5771ae..27ce9ce42e2a7f7a733c6c5a5118beaa1a2427e0 100644 --- a/wax-questions-service/src/MultipleDropDownService/components/ContainerEditor.js +++ b/wax-questions-service/src/MultipleDropDownService/components/ContainerEditor.js @@ -15,7 +15,7 @@ import { WaxContext, ComponentPlugin } from 'wax-prosemirror-core'; import FakeCursorPlugin from '../plugins/FakeCursorPlugin'; const EditorWrapper = styled.div` - // position: relative; + position: relative; height: 100%; > .ProseMirror { diff --git a/wax-questions-service/src/MultipleDropDownService/components/DropDownComponent.js b/wax-questions-service/src/MultipleDropDownService/components/DropDownComponent.js index 5435583a4f9f92614c284cec26f20df82ea59b0d..f52cc6b889ebc5d7c93c33f80afdf14c3a5d7985 100644 --- a/wax-questions-service/src/MultipleDropDownService/components/DropDownComponent.js +++ b/wax-questions-service/src/MultipleDropDownService/components/DropDownComponent.js @@ -119,13 +119,14 @@ export default ({ setPosition, position }) => { const { from } = selection; const WaxSurface = activeView.dom.getBoundingClientRect(); const start = activeView.coordsAtPos(from); + console.log(start, WaxSurface.top); const left = start.left - WaxSurface.left - 75; const top = start.top - WaxSurface.top + 25; setPosition({ ...position, left, top }); }, [position.left]); useEffect(() => { - // if (addOptionRef.current) addOptionRef.current.focus(); + if (addOptionRef.current) addOptionRef.current.focus(); if (!activeView.state.selection.node) return; const { tr } = activeView.state; @@ -163,7 +164,7 @@ export default ({ setPosition, position }) => { const obj = { label: addOptionRef.current.value, value: uuidv4() }; setOptions(prevOptions => [...prevOptions, obj]); setOptionText(''); - // addOptionRef.current.focus(); + addOptionRef.current.focus(); }; const removeOption = id => { diff --git a/wax-questions-service/src/MultipleDropDownService/components/MultipleDropDownComponent.js b/wax-questions-service/src/MultipleDropDownService/components/MultipleDropDownComponent.js index a5515fe3848e68aac4e6bc9f322bf4ca41d51f94..06f9aa9e08a20590f0ea390d3300f239c59bb5f8 100644 --- a/wax-questions-service/src/MultipleDropDownService/components/MultipleDropDownComponent.js +++ b/wax-questions-service/src/MultipleDropDownService/components/MultipleDropDownComponent.js @@ -14,7 +14,6 @@ const activeStylesSvg = css` `; const StyledIconActionContainer = styled.div` - font-variant-numeric: lining-nums proportional-nums; display: inline-block; height: 24px; width: 24px; @@ -24,7 +23,6 @@ const StyledIconActionContainer = styled.div` const StyledIconAction = styled(Icon)` ${props => props.isActive && activeStylesSvg} - display: inline-block; `; const AnswerContainer = styled.div` @@ -69,8 +67,7 @@ export default ({ node, getPos }) => { if (!readOnly) { return ( <StyledIconActionContainer isActive={isActive}> - 1 - {/* <StyledIconAction isActive={isActive} name="mulitpleDropDown" /> */} + <StyledIconAction isActive={isActive} name="mulitpleDropDown" /> </StyledIconActionContainer> ); } diff --git a/wax-questions-service/src/MultipleDropDownService/schema/multipleDropDownOptionNode.js b/wax-questions-service/src/MultipleDropDownService/schema/multipleDropDownOptionNode.js index 89f5af2a362962b6ae32b0e720cd9be4b8d0954a..90452d15a616f0ed1c65c03844ce7142b0f3a50f 100644 --- a/wax-questions-service/src/MultipleDropDownService/schema/multipleDropDownOptionNode.js +++ b/wax-questions-service/src/MultipleDropDownService/schema/multipleDropDownOptionNode.js @@ -6,6 +6,7 @@ const multipleDropDownOptionNode = { correct: { default: '' }, answer: { default: '' }, }, + content: 'inline*', group: 'inline questions', inline: true, atom: true,