3.2.25: 评论框改为所见即所得编辑器(B/I/颜色/表情可视化+序列化白名单+纯文本粘贴);后台资源 enqueue 版本号改跟 THEME_VERSION(修设置页重排被浏览器缓存挡住的问题)

This commit is contained in:
2026-10-24 22:38:10 +08:00
parent fd27b4d218
commit fb12d58067
5 changed files with 174 additions and 69 deletions
+39
View File
@@ -925,6 +925,45 @@
background: none;
}
/* 3.2.25 所见即所得编辑区:顶替原 textarea 的可视位置。
* 边框 / 底色 / 聚焦态都挂在 .comment-textarea 容器上(focus-within),
* 编辑区本体只管排版 —— 整框仍是"一个编辑器"的观感。 */
.k-main .details .comments .comment-respond .comment-textarea .comment-editor,
.comment-textarea .comment-editor {
min-height: 136px;
max-height: 420px;
overflow-y: auto;
padding: 12px 14px;
border: 0;
background: none;
color: #2b3038;
font-family: inherit;
font-size: 14px;
line-height: 1.5;
word-break: break-word;
outline: none;
cursor: text;
-webkit-appearance: none;
}
.comment-editor:focus {
outline: none;
}
/* 占位符:编辑区为空时显示(:empty 由 input 监听保真空) */
.comment-editor:empty::before {
content: attr(data-placeholder);
color: var(--yq-text-3, #6b7280);
pointer-events: none;
}
/* 编辑区里的表情图:跟正文字号走,基线对齐 */
.comment-editor .yang-editor-emoji {
height: 1.25em;
vertical-align: -0.25em;
margin: 0 1px;
}
/* 工具条:加粗 / 斜体 / 字体颜色 / 表情。
*
* 位于输入框上方,与 textarea 同在 .comment-textarea 这个带边框的