feat: 更新问题页面和提交页面,集成Vditor适配器,优化Markdown渲染

This commit is contained in:
2026-04-10 15:47:26 +08:00
parent 0c7297afd7
commit 40b77471b5
35 changed files with 1996 additions and 1004 deletions

View File

@@ -328,20 +328,22 @@ function loadFromBlockly(){
</script>
<script language="Javascript" type="text/javascript" src="include/base64.js"></script>
<?php if($OJ_ACE_EDITOR){ ?>
<script src="ace/ace.js"></script>
<script src="ace/ext-language_tools.js"></script>
<script src="include/vditor-adapter.js"></script>
<script>
ace.require("ace/ext/language_tools");
var editor = ace.edit("source");
editor.setTheme("ace/theme/chrome");
switchLang(<?php echo $lastlang ?>);
editor.setOptions({
var editor = HustOJVditor.createDeferredCodeEditor({
container: "source",
hiddenField: "hide_source",
theme: "ace/theme/chrome",
fontSize: 20
});
switchLang(<?php echo $lastlang ?>);
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: false,
fontFamily: "Consolas",
fontSize: "20px"
});
enableSnippets: true,
enableLiveAutocompletion: false,
fontFamily: "Consolas",
fontSize: "20px"
});
reloadtemplate($("#language").val());
</script>