From fdf9e1bb7e087f353f744b9f5e3440b5d93f0649 Mon Sep 17 00:00:00 2001 From: Joakim Date: Sun, 7 Sep 2025 20:43:43 +0200 Subject: [PATCH] feat: implement container expansion and group editing functionality - Add container element detection and child expansion in InsertrCore - Implement .insertr descendant expansion matching CLI behavior - Add .insertr-group collective editing with markdown editor - Fix UX issue where div.insertr got text input instead of proper child editors - Add comprehensive test cases for both features in about.html - Enable live preview for group editing with proper content splitting --- demo-site/about.html | 31 +++++- lib/src/core/insertr.js | 128 +++++++++++++++++++-- lib/src/ui/form-renderer.js | 214 +++++++++++++++++++++++++++++++++++- 3 files changed, 363 insertions(+), 10 deletions(-) diff --git a/demo-site/about.html b/demo-site/about.html index 3d2f91a..d6a0a9c 100644 --- a/demo-site/about.html +++ b/demo-site/about.html @@ -33,7 +33,7 @@

Our Story

-
+

Founded in 2020, Acme Consulting emerged from a simple observation: small businesses needed access to the same high-quality strategic advice that large corporations receive, but in a format that was accessible, affordable, and actionable.

Our founders, with combined experience of over 30 years in business strategy, operations, and technology, recognized that the traditional consulting model wasn't serving the needs of growing businesses. We set out to change that.

@@ -96,6 +96,33 @@
+ +
+
+

Feature Tests

+ + +
+

Test 1: Container Expansion (.insertr)

+
+

This paragraph should be individually editable with a textarea.

+

This second paragraph should also be individually editable.

+

Each paragraph should get its own modal when clicked.

+
+
+ + +
+

Test 2: Group Editing (.insertr-group)

+
+

This paragraph is part of a group.

+

Clicking anywhere in the group should open one markdown editor.

+

All content should be editable together as markdown.

+
+
+
+
+