Commit 51dc752
committed
fix(timer): refactor to StateField for proper block decorations
Replace ViewPlugin with StateField to resolve CodeMirror block decoration
error. Use editorInfoField for proper editor access and replace innerHTML
with Obsidian's native DOM APIs.
- Replace ViewPlugin with StateField for block-level decorations
- Use state.field(editorInfoField) to access editor and app instances
- Remove innerHTML usage in favor of createEl/createDiv/createSpan
- Fix "Block decorations may not be specified via plugins" error
- Improve CSS with proper width and box-sizing for block display
- Maintain all existing timer functionality (start/pause/complete)1 parent 46358c3 commit 51dc752
2 files changed
Lines changed: 355 additions & 517 deletions
0 commit comments