diff --git a/editors/demo/src/HHMI/layout/HhmiLayout.js b/editors/demo/src/HHMI/layout/HhmiLayout.js index e3f29261eb4763c1559c519609be9aa0e6c03232..45c1984b415ff29cafe92aea53db0b754f792de3 100644 --- a/editors/demo/src/HHMI/layout/HhmiLayout.js +++ b/editors/demo/src/HHMI/layout/HhmiLayout.js @@ -60,12 +60,14 @@ const EditorArea = styled.div` `; const WaxSurfaceScroll = styled.div` + padding: 25px 25% 0 25%; box-sizing: border-box; display: flex; height: 100%; overflow-y: auto; - padding: 25px 25% 0 25%; + position: relative; width: 100%; + /* PM styles for main content*/ ${EditorElements}; `; @@ -73,6 +75,7 @@ const WaxSurfaceScroll = styled.div` const EditorContainer = styled.div` height: 100%; width: 100%; + position: relative; .ProseMirror { box-shadow: 0 0 8px #ecedf1; diff --git a/wax-prosemirror-components/src/components/link/LinkComponent.js b/wax-prosemirror-components/src/components/link/LinkComponent.js index 33241a8ce76e6a9b8af37e0daf62acd418961205..a5e05f0e1d1861c22eaca9f2afa0ad8f858b6540 100644 --- a/wax-prosemirror-components/src/components/link/LinkComponent.js +++ b/wax-prosemirror-components/src/components/link/LinkComponent.js @@ -7,6 +7,7 @@ import { DocumentHelpers } from 'wax-prosemirror-utilities'; const Wrapper = styled.div` background: #fff; + display: flex; border-radius: 1.03093% / 8%; box-shadow: rgba(9, 30, 66, 0.25) 0px 4px 8px 0px, rgba(9, 30, 66, 0.31) 0px 0px 1px 0px; @@ -38,7 +39,7 @@ const Input = styled.input` `; const ButtonGroup = styled.div` - display: inline-block; + display: flex; `; const StyledButton = styled.button` diff --git a/wax-prosemirror-core/src/styles/styles.css b/wax-prosemirror-core/src/styles/styles.css index c9790cf95743b105902e9be769b21df24b8c3ab1..678342449a452a5f991c4381d47624b0d721e5e6 100644 --- a/wax-prosemirror-core/src/styles/styles.css +++ b/wax-prosemirror-core/src/styles/styles.css @@ -143,14 +143,6 @@ img.ProseMirror-separator { /* -- Selection Plugin ---------------------------------- */ - p::selection, - p > *::selection { - background-color: #c0c0c0; - } - .katex-html *::selection { - background-color: none !important; - } - .math-node.math-select .math-render { background-color: #c0c0c0ff; } diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js index 4c06b3b6b50cff128cadca11102de5854b1679be..fc62a1a706b3a2025e909abde004ca30e9f3921c 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/EditorComponent.js @@ -27,6 +27,14 @@ const EditorWrapper = styled.div` outline: none; } + :empty::before { + content: 'Type your answer'; + color: #aaa; + float: left; + font-style: italic; + pointer-events: none; + } + p.empty-node:first-child::before { content: attr(data-content); } diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js index b3d8fa22cdcd6c5426b3735dafa4792b528a555d..500a53ce9ab1fa5d9e0ccb081fc25cdeb9f04de8 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/components/QuestionEditorComponent.js @@ -32,6 +32,14 @@ const EditorWrapper = styled.div` outline: none; } + :empty::before { + content: 'Type your question'; + color: #aaa; + float: left; + font-style: italic; + pointer-events: none; + } + p.empty-node:first-child::before { content: attr(data-content); } diff --git a/wax-prosemirror-services/src/MultipleChoiceQuestionService/helpers/helpers.js b/wax-prosemirror-services/src/MultipleChoiceQuestionService/helpers/helpers.js index 197698db180904cbb5512a0f43738842e0102dba..e0c424ef41659226475be6b186019bdc76933eac 100644 --- a/wax-prosemirror-services/src/MultipleChoiceQuestionService/helpers/helpers.js +++ b/wax-prosemirror-services/src/MultipleChoiceQuestionService/helpers/helpers.js @@ -79,11 +79,11 @@ const createOptions = (main, context, parentType, questionType, answerType) => { tr.replaceSelectionWith(secondOption); dispatch(tr); - setTimeout(() => { - createEmptyParagraph(context, firstOption.attrs.id); - createEmptyParagraph(context, secondOption.attrs.id); - createEmptyParagraph(context, question.attrs.id); - }, 50); + // setTimeout(() => { + // createEmptyParagraph(context, firstOption.attrs.id); + // createEmptyParagraph(context, secondOption.attrs.id); + // createEmptyParagraph(context, question.attrs.id); + // }, 50); return true; };