feat: Implement HTML-first style preservation system

- Add StyleContext class for extracting and applying HTML attributes/styles
- Enhance MarkdownConverter with style-aware conversion methods
- Switch backend storage from markdown to HTML with 'html' content type
- Update editor workflow to preserve CSS classes, IDs, and attributes
- Maintain markdown editing UX while storing HTML for style preservation
- Support complex attributes like rel, data-*, aria-*, etc.

This enables editing styled content like <a class="fancy" rel="me">text</a>
while preserving all styling attributes through the markdown editing process.
This commit is contained in:
2025-09-19 16:03:05 +02:00
parent 00c2ba34e6
commit b7998a4b3c
7 changed files with 498 additions and 26 deletions

View File

@@ -1,14 +1,11 @@
# AGENTS.md - Developer Guide for Insertr
## Build/Test Commands
Let me handle running and building the server. I run just dev in a different terminal, so you can just test the api directly, without spinning up an instance.
- `just dev` - Full-stack development (recommended)
- `just build` - Build entire project (Go binary + JS library)
- `just build-lib` - Build JS library only
- `just test` - Run tests (placeholder, no actual tests yet)
- `just lint` - Run linting (placeholder, no actual linting yet)
- `just air` - Hot reload Go backend only
- `go test ./...` - Run Go tests (when available)
For running and testing our application read our justfile.
## Code Style Guidelines