revert: remove syntax highlighting feature entirely

Syntax highlighting overlay approach proved too fragile:
- pixel alignment between textarea and overlay unreliable
- transparent textarea caused invisible content bugs
- dynamic gutter width positioning added complexity

Removed:
- _highlightEditor, _doHighlight, toggleSyntaxHighlight, _positionHighlightLayer
- highlightLayer DOM element creation
- .me-highlight-layer, .mh-*, .me-textarea-highlight CSS
- syntaxHighlight config option from DEFAULTS
- highlight toggle button from demo.html

Kept: Mermaid, fileSystem, preview links, all other v0.1.14 features
This commit is contained in:
2026-07-24 18:10:27 +08:00
parent f7752ee02c
commit c6db68af59
4 changed files with 1 additions and 123 deletions
-3
View File
@@ -68,7 +68,6 @@ body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Micr
<div class="spacer"></div>
<button data-cmd="zen" title="Zen 专注模式">🧘 Zen</button>
<button data-cmd="outline" title="切换大纲面板">📋 大纲</button>
<button data-cmd="highlight" title="切换语法高亮">🎨 高亮</button>
<button data-cmd="wrap" title="切换自动换行">↩ 换行</button>
<button data-cmd="toast" title="Toast 通知演示">💬 Toast</button>
<button data-cmd="openFile" title="打开磁盘文件">📂 打开</button>
@@ -199,7 +198,6 @@ var editor=MeEditor.create('#editor',{
value:demoMd,
mode:'split',height:620,
lineNumbers:true,autoBrackets:true,wordCount:true,
syntaxHighlight:true,
theme:'auto',locale:'zh-CN',
outline:false,
plugins:['autoSave','exportTool','searchReplace','imagePaste','shortcutHelp','fileSystem'],
@@ -229,7 +227,6 @@ bar.addEventListener('click',function(e){
if(cmd==='mode'){editor.setMode(btn.dataset.arg);updateModeBtns(btn.dataset.arg);}
else if(cmd==='zen'){editor.toggleZen();btn.classList.toggle('on',editor.isZen());}
else if(cmd==='outline'){toggleOutline(btn);}
else if(cmd==='highlight'){editor.toggleSyntaxHighlight();btn.classList.toggle('on',editor.config.syntaxHighlight);}
else if(cmd==='wrap'){editor.toggleWordWrap();btn.classList.toggle('on',!editor.isWordWrap());}
else if(cmd==='toast'){
var types=['success','error','warning','info'];