release: v0.1.2 — readOnly, new syntax, plugins, optimizations
Features: - feat(core): readOnly mode with config option and setReadOnly() API - feat(parser): superscript ^text^ and subscript ~text~ support - feat(parser): highlight/mark ==text== syntax - feat(parser): table column alignment with colons (:---, :---:, ---:) - feat(parser): emoji shortcodes 😄 → 😊 (80+ common emojis) - feat(plugins): imagePaste preset — paste clipboard images as base64 - feat(core): instance-level beforeRender/afterRender events - feat(styles): print stylesheet (@media print) - feat(styles): mark element CSS styling - feat(styles): readOnly mode CSS (.me-readonly) Optimizations: - perf(core): history debounce now configurable via historyDebounce option - perf(core): skip _render() in edit-only mode (already guarded) - fix(core): divider drag division-by-zero guard - fix(core): config.style deep merge with DEFAULTS - fix(core): scroll position preserved across mode switches Tests: - 9 new test cases: readOnly (3), parser syntax (6) - Total: 418 tests passing (+9 from v0.1.1) Chores: - version bump 0.1.1 → 0.1.2 - TypeScript definitions updated for new APIs
This commit is contained in:
+29
-1
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* MetonaEditor Styles - 编辑器样式
|
||||
* @module styles
|
||||
* @version 0.1.1
|
||||
* @version 0.1.2
|
||||
* @description 编辑器 UI 样式注入与管理
|
||||
*/
|
||||
|
||||
@@ -323,6 +323,34 @@ const generateCSS = () => {
|
||||
/* ============ 全屏模式优化 ============ */
|
||||
.me-wrapper.me-fullscreen .me-preview,
|
||||
.me-wrapper.me-fullscreen .me-textarea { font-size: 15px; }
|
||||
|
||||
/* ============ 只读模式 ============ */
|
||||
.me-wrapper.me-readonly .me-textarea {
|
||||
background: var(--md-code-bg);
|
||||
cursor: default;
|
||||
opacity: 0.88;
|
||||
}
|
||||
.me-wrapper.me-readonly .me-toolbar {
|
||||
opacity: 0.45; pointer-events: none;
|
||||
}
|
||||
|
||||
/* ============ 高亮标记 ============ */
|
||||
.me-preview mark {
|
||||
background: rgba(250, 204, 21, 0.3);
|
||||
color: inherit;
|
||||
padding: 0.1em 0.2em;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* ============ 打印样式 ============ */
|
||||
@media print {
|
||||
.me-wrapper { border: 0 !important; box-shadow: none !important; }
|
||||
.me-toolbar, .me-statusbar, .me-divider { display: none !important; }
|
||||
.me-body.me-mode-split .me-editor-pane { display: none; }
|
||||
.me-body.me-mode-split .me-preview-pane { flex: 1 1 100% !important; }
|
||||
.me-preview { padding: 0 !important; font-size: 11pt; }
|
||||
.me-wrapper.me-fullscreen { position: static !important; width: auto !important; height: auto !important; }
|
||||
}
|
||||
`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user