fix: 修复编辑器代码块换行滚动跳动 + 移除视频和网络图片功能
- 修复 wangeditor 选区同步 scrollIntoView 导致代码块换行大幅跳动的问题 - 移除 getBoundingClientRect 替换 hack,改用元素自身真实位置计算滚动 - 将 block 参数从 end 改为 nearest,behavior 从 smooth 改为 instant - 修复 #editor-container 与 .w-e-scroll 双重滚动容器冲突 - #editor-container 和 .w-e-text-container 设为 overflow:hidden - .w-e-scroll 作为唯一滚动容器设 overflow-y:auto - updateCodeLabels 改为节流执行并保存/恢复滚动位置 - 新增 ensureCursorVisible 替代内置滚动保证光标可见 - 滚动同步函数统一引用 .w-e-scroll 容器 - 工具栏排除视频相关按钮和网络图片功能 - .gitignore 添加 .codebuddy
This commit is contained in:
@ -15,12 +15,18 @@
|
||||
}
|
||||
#editor-container {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
}
|
||||
/* .w-e-scroll 是 wangEditor 内部唯一的滚动容器 */
|
||||
.editor-pane .w-e-text-container {
|
||||
height: 100% !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
.editor-pane .w-e-scroll {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.editor-pane .w-e-text-container [data-slate-editor] {
|
||||
min-height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user