Commit Graph
7 Commits
Author SHA1 Message Date
thzxx 70eb71623f docs: update README for v0.1.3 — features, API, syntax, tests
- Feature list: add readOnly, imagePaste, emoji, render cache, print styles
- Test badge: 407 → 425
- Config: add readOnly, historyDebounce options
- API: add refresh(), setReadOnly(), isReadOnly()
- getStatus: add readOnly field
- Events: add beforeRender, afterRender instance events
- Plugins: add imagePaste preset documentation
- Syntax table: add highlight, superscript, subscript, emoji, table alignment
- Test coverage: update file descriptions and total count
2026-07-23 21:03:02 +08:00
thzxx 8d2e172289 release: v0.1.3 — bug fixes, performance, hardening
Bug Fixes:
- fix(core): exec() now supports _customActions registered via addToolbarButton
- fix(core): _emit('focus'/'blur') no longer passes editor argument twice
- fix(core): getHTML() now triggers beforeRender/afterRender hooks
- fix(core): _wrapSelection defaults to 'text' instead of i18n placeholder
- fix(core): addToolbarButton onClick+action no longer double-fires
- fix(core): null-safety on focus/blur/enable/disable after destroy
- fix(parser): empty headings (# ) no longer produce empty <h1> tags
- fix(parser): slugify returns 'heading' fallback for empty/special inputs
- fix(i18n): setCurrentLocale no longer mutates input parameter
- fix(core): autofocus skipped when readOnly is enabled

Performance:
- perf(core): cache last rendered value, skip parsing when content unchanged
- perf(core): add refresh() API to force re-render after theme/locale changes

Hardening:
- feat(core): tabSize dynamically applied to textarea via style.tabSize
- feat(core): getStatus() now includes readOnly field

Tests:
- 7 new test cases: customActions, refresh, focus args, destroy safety,
  getStatus readOnly, autofocus+readOnly, slugify edge cases
- Total: 425 tests passing (+7 from v0.1.2)

Types:
- EditorStatus includes readOnly field
- MarkdownEditor.refresh() added to type definitions
2026-07-23 21:00:09 +08:00
thzxx 12875921eb 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
2026-07-23 20:53:36 +08:00
thzxx 9e0c1d7a7f release: v0.1.1 — bug fixes, CSS scoping, parser improvements
Bug Fixes:
- fix(core): insert() replace param was non-functional due to identical ternary branches
- fix(types): correct project URL typo (MetonaToast → MetonaEditor)

Improvements:
- feat(core): scope CSS theme variables to .me-wrapper per-instance, preventing global style pollution
- feat(themes): add optional target parameter to setThemeVariables() for element-scoped theming
- perf(parser): improve bold/strikethrough regex to support inline delimiter chars (e.g. **a*b**, ~~a~b~~)
- fix(parser): prevent *** cross-tag nesting by requiring first content char ≠ delimiter
- docs(animations): clarify module purpose as future-use animation metadata registry

Tests:
- test(core): add 2 cases for insert() replace:true / replace:false behavior
- All 409 tests passing (+2 new)

Chores:
- bump version 0.1.0 → 0.1.1 across all source files, package.json, README, and demo
2026-07-23 20:02:04 +08:00
thzxx 61d65f7112 docs: remove redundant related links section from README 2026-07-23 16:36:44 +08:00
thzxx a08d8571cb docs: fix README CDN URLs, remove non-existent CSS link, update test counts 2026-07-23 16:32:05 +08:00
thzxx 22e867eda8 Initial commit: MetonaEditor v0.1.0 2026-07-23 16:23:07 +08:00