feat: v0.2.3 — 浮动格式工具栏 + 10个新API + 德语翻译 + 类型修复
### Added - 浮动格式工具栏:选中文本自动弹出 bold/italic/code/link/strikethrough - 10 个新 API: getSelectedText/getCursorPosition/setCursorPosition/scrollToLine/selectLine/selectAll/replaceAll/replaceAllRegex/lineCount/getLine - 2 个新事件: selectionChange / cursorMove - 德语 (de) locale 完整翻译 - floatingToolbar 配置项(默认 true) ### Fixed - onLinkClick 移除 as any,正式加入 EditorOptions/DEFAULTS - 所有版本号统一为 0.2.3 ### Tests - core.test.ts: 183 → 214 (+31 tests) - 总计 ~725 tests
This commit is contained in:
@@ -2,6 +2,26 @@
|
||||
|
||||
All notable changes to MetonaEditor will be documented in this file.
|
||||
|
||||
## [0.2.3] - 2026-07-25
|
||||
|
||||
### Added
|
||||
- **German (de) locale**: Complete translations for all 60+ UI keys.
|
||||
- **Floating format toolbar**: Auto-shows bold/italic/code/link/strikethrough buttons above text selection.
|
||||
- **Cursor/selection APIs**: `getSelectedText()`, `getCursorPosition()`, `setCursorPosition()`, `scrollToLine()`, `selectLine()`, `selectAll()`.
|
||||
- **Content manipulation APIs**: `replaceAll()`, `replaceAllRegex()`, `lineCount()`, `getLine()`.
|
||||
- **New events**: `selectionChange` and `cursorMove` emitted for cursor/selection tracking.
|
||||
- **`floatingToolbar` config option**: Enable/disable floating toolbar (default `true`).
|
||||
|
||||
### Changed
|
||||
- **`floatingToolbar` added to `DEFAULTS` and `EditorOptions` type**.
|
||||
- **6 locales now**: zh-CN, en-US, ja, ko, fr, de.
|
||||
|
||||
### Fixed
|
||||
- **`onLinkClick` type fix**: Removed `as any` cast; properly typed in `EditorOptions` and `DEFAULTS`.
|
||||
- **Version consistency**: All files synced to 0.2.3.
|
||||
|
||||
---
|
||||
|
||||
## [0.2.2] - 2026-07-25
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user