✨ feat: 更新问题页面和提交页面,集成Vditor适配器,优化Markdown渲染
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user