You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,7 +265,7 @@ cd testing && npm run test:e2e
265
265
266
266
## Modify Mode
267
267
268
-
Modify mode (`modify-mode.js`) lets users make plain elements editable at runtime, without requiring `{.editable}` in the source document. Currently images are supported; additional element types can be added via the classifier registry.
268
+
Modify mode (`modify-mode.js`) lets users make plain elements editable at runtime, without requiring `{.editable}` in the source document. Supported element types: plain images, `{.absolute}` images, plain videos, `{.absolute}` divs, and slide titles (`## heading`). Additional types can be added via the classifier registry.
269
269
270
270
### Lifecycle
271
271
@@ -275,7 +275,7 @@ The toolbar "Modify" button calls `toggleModifyMode()`. When entering modify mod
275
275
3.**Warn** elements receive `modify-mode-warn` (amber ring, not clickable); their reason string is stored in `_warnReasons` and readable via `getWarnReason(el)`
276
276
4. A `slidechanged` listener re-runs classification on every slide navigation so rings stay current
277
277
278
-
Mode stays active after each elementis clicked. The user dismisses it by clicking the toolbar button again.
278
+
When the user clicks a valid element, `activate(el)`is called. If `activate` returns a truthy value, modify mode stays active (the classifier manages its own exit — e.g. the slide title classifier keeps the toolbar open until the user clicks away). Otherwise `exitModifyMode()` is called immediately.
279
279
280
280
### Classifier Registry
281
281
@@ -291,7 +291,9 @@ New element types are added by calling `ModifyModeClassifier.register(classifier
291
291
};
292
292
},
293
293
294
-
// Required — called when the user clicks a valid element
294
+
// Required — called when the user clicks a valid element.
295
+
// Return true to keep modify mode active (classifier calls exitModifyMode itself).
296
+
// Return falsy to exit modify mode automatically after activation.
295
297
activate(el) {
296
298
// stamp data-attributes, call setupImageWhenReady / setupDivWhenReady, etc.
Copy file name to clipboardExpand all lines: NEWS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ All notable changes to the quarto-revealjs-editable extension will be documented
6
6
7
7
### Added
8
8
9
+
-**Modify mode: slide title editing** - Slide `## ` headings are now activatable in modify mode. Click the highlighted title to open a formatting toolbar (bold, italic, underline, strikethrough, text color, background color) and edit the heading inline. Press Enter or click away to finish; the title can be re-activated to edit again. On save the `## Heading text` line is updated in place with inline formatting serialized to Quarto markdown (`**bold**`, `*italic*`, `~~strike~~`, `[text]{style='color: ...'}`).
9
10
-**Modify mode: video support** - Videos inserted with `` markdown syntax are now activatable in modify mode. Click a highlighted video to enable drag, resize, and rotate. On save the `](src)` reference is updated in-place with `{.absolute ...}` positioning, using the same approach as plain images.
10
11
-**Modify mode: `{.absolute}` images** - Images previously saved with `{.absolute}` attributes (but without `{.editable}`) are now activatable in modify mode. Click a highlighted image to enable drag, resize, and rotate. On save the existing `](src){.absolute ...}` block is updated in-place using both the image src and position as a matching key.
11
12
-**Modify mode: `{.absolute}` divs** - Divs previously saved with `{.absolute}` attributes (but without `{.editable}`) are now activatable in modify mode. Click a highlighted div to enable drag, resize, and rotate. On save the existing `{.absolute ...}` attribute block is updated in-place; no wrapper is added.
0 commit comments