diff --git a/src/AppConfig.js b/src/AppConfig.js index 9c5fbfd4..cf7fe8b6 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index caabe84c..372af720 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -395,6 +395,7 @@ class CoderRootFileDetail extends Component { filepath={`/${detail.path}`} content={detail.content} readOnly={readOnly} + md={md} editorType="update" currentBranch={currentBranch} descName={detail && `Update ${detail.name}`} diff --git a/src/forge/Newfile/m_editor.js b/src/forge/Newfile/m_editor.js index ae2ad19b..0dc3595f 100644 --- a/src/forge/Newfile/m_editor.js +++ b/src/forge/Newfile/m_editor.js @@ -6,6 +6,7 @@ import 'codemirror/mode/clike/clike'; import 'codemirror/mode/css/css'; import UserSubmitComponent from "./UserSubmitComponent"; import CloudIDE from "./cloudIDE"; +import { Base64 } from "js-base64"; import "./index.css"; import "./editor.css"; @@ -34,7 +35,7 @@ class m_editor extends Component { render() { const { editorValue, changeValue } = this.state; - const { readOnly, editorType,onEmpty,filename,empty, currentBranch, descName, checkName, detail, match: { params },filepath,ideTheme } = this.props; + const { readOnly, editorType,onEmpty,filename,empty, currentBranch, descName, checkName, detail, match: { params },filepath, ideTheme , md } = this.props; const editor_options = { lineNumbers: "on", lineWrapping: true, //强制换行 @@ -64,7 +65,7 @@ class m_editor extends Component { {!readOnly ? :