✨ feat: 更新问题页面和提交页面,集成Vditor适配器,优化Markdown渲染
This commit is contained in:
@@ -208,26 +208,40 @@ a:hover {
|
||||
</div>
|
||||
<?php require("./template/bshark/footer.php");?>
|
||||
<?php require("./template/bshark/footer-files.php");?>
|
||||
<script src="include/vditor-adapter.js"></script>
|
||||
<script type="text/javascript">
|
||||
var E = window.wangEditor
|
||||
var editor = new E('#editor')
|
||||
|
||||
editor.customConfig.zIndex = 0
|
||||
editor.customConfig.menus = [
|
||||
//'head',
|
||||
'bold',
|
||||
//'italic',
|
||||
//'underline',
|
||||
'link',
|
||||
//'list',
|
||||
//'quote',
|
||||
//'table',
|
||||
'image',
|
||||
'emoticon',
|
||||
'code'
|
||||
]
|
||||
// 或者 var editor = new E( document.getElementById('editor') )
|
||||
editor.create()
|
||||
var editor = {
|
||||
txt: {
|
||||
html: function () {
|
||||
return $("#aa").val();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
HustOJVditor.createRichTextEditor({
|
||||
container: '#editor',
|
||||
hiddenField: '#aa',
|
||||
mode: 'wysiwyg',
|
||||
minHeight: 180,
|
||||
toolbar: [
|
||||
'bold',
|
||||
'italic',
|
||||
'strike',
|
||||
'|',
|
||||
'link',
|
||||
'emoji',
|
||||
'code',
|
||||
'|',
|
||||
'undo',
|
||||
'redo',
|
||||
'|',
|
||||
'fullscreen'
|
||||
]
|
||||
}).then(function (instance) {
|
||||
editor = instance;
|
||||
}).catch(function (error) {
|
||||
console.error('Failed to initialize Vditor mail editor.', error);
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var div = document.getElementById('infos');
|
||||
|
||||
Reference in New Issue
Block a user