diff --git a/public/index.html b/public/index.html index fe0ce393..7774b2c5 100755 --- a/public/index.html +++ b/public/index.html @@ -13,7 +13,7 @@ - + <%= htmlWebpackPlugin.tags.headTags %> @@ -27,8 +27,8 @@ - - + + <%= htmlWebpackPlugin.tags.bodyTags %> \ No newline at end of file diff --git a/src/modules/tpm/challengesnew/tpm-md-editor.js b/src/modules/tpm/challengesnew/tpm-md-editor.js index e1c06eda..c074d3dc 100644 --- a/src/modules/tpm/challengesnew/tpm-md-editor.js +++ b/src/modules/tpm/challengesnew/tpm-md-editor.js @@ -6,6 +6,7 @@ import ResizeObserver from 'resize-observer-polyfill'; import '../../courses/css/Courses.css'; import './css/TPMchallengesnew.css'; import 'codemirror/lib/codemirror.css'; +import { AutoComplete } from 'antd'; const $ = window.$ const mdIcons = ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear"]; @@ -200,6 +201,10 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla } if (onChange) { editorInstance.cm.on('change', (cm) => { + $(`#editorBodyId`).atwho({ + at: '@', + data:['111','222'] + }) // if(forMember){ // document.onkeydown = (e) => { // if (e.key === "@") { @@ -225,6 +230,11 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla useEffect(() => { if (editorInstance && initValue !== undefined) { + $(`#editorBodyId`).atwho({ + at: '@', + data:['111','222'] + }) + const val = editorInstance.getValue(); if (initValue !== null && initValue !== editorInstance.getValue()) { editorInstance.setValue(initValue.toString()) } @@ -273,7 +283,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
- +