优化editor.md编辑器文本高亮标记,开启Vditor编辑器文本高亮标记渲染

This commit is contained in:
yangjian 2021-02-01 19:03:10 +08:00
parent 9f05dce9e1
commit b88051f117
2 changed files with 5 additions and 1 deletions

View File

@ -3472,7 +3472,8 @@
atLink : /@(\w+)/g,
email : /(\w+)@(\w+)\.(\w+)\.?(\w+)?/g,
emailLink : /(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g,
mark : /==([^\s][^\<\/code\>][\s\S]*?[^\s])==(?!=)/g,
// mark : /==([^\s][^\<\/code\>][\s\S]*?[^\s])==(?!=)/g,
mark : /(={2})([^\<\/code\>].+?)\1/g,
emoji : /:([A-Za-z\+-]+):/g,
emojiDatetime : /(\d{2}:\d{2}:\d{2})/g,
twemoji : /:(tw-([\w]+)-?(\w+)?):/g,

View File

@ -353,6 +353,9 @@
Vditor.preview(document.getElementById('content'),md_content,
{
"cdn":"{% static 'vditor' %}",
markdown:{
mark:true
},
speech: {
enable: true,
},