diff --git a/src/modules/tpm/challengesnew/css/newquestion.css b/src/modules/tpm/challengesnew/css/newquestion.css index dbf45193..ca1ebb05 100644 --- a/src/modules/tpm/challengesnew/css/newquestion.css +++ b/src/modules/tpm/challengesnew/css/newquestion.css @@ -18,6 +18,7 @@ top: 100px; left: 100px; overflow-y: scroll; + cursor: pointer; } .at_who{ height: 40px; @@ -25,6 +26,10 @@ flex-direction: row; align-items: center; border-bottom: 1px solid rgba(212, 212, 212, 0.5); + padding: 0 4px; +} +.at_who:hover{ + background: #F3F4F6; } .at_who img{ width:30px; diff --git a/src/modules/tpm/challengesnew/tpm-md-editor.js b/src/modules/tpm/challengesnew/tpm-md-editor.js index 4736287c..a8243879 100644 --- a/src/modules/tpm/challengesnew/tpm-md-editor.js +++ b/src/modules/tpm/challengesnew/tpm-md-editor.js @@ -106,11 +106,20 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla return ro; } + useEffect(()=>{ + document.addEventListener('click',()=>{setAtWhoVisible(false)}); + }) + + function selectAtWho(username){ + setAtWhoVisible(false); + editorInstance.setValue(initValue.toString()+username); + } + const atWhoList = (