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: README.md
+24-6Lines changed: 24 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -205,17 +205,29 @@ window.addEventListener(
205
205
206
206
Another part of the above-mentioned communication protocol enables the editors to click properties within the preview to edit them.
207
207
208
-
To implement this, first add `umb-preview-edit='[property alias]'` attributes to the preview rendering for the relevant document properties - for example:
208
+
To implement this, first add `umb-preview-edit='[options]'` attributes to the preview rendering for the relevant document properties. The attribute value is expected to follow the pattern `PropertyAlias[:EditMode[:ModalSize]]`, where:
209
+
210
+
-`PropertyAlias` (required): The Umbraco alias of the property to edit.
211
+
-`EditMode` (optional): How the property should be edited:
212
+
-`default` brings the editors back to the Umbraco "Content" view.
213
+
-`modal` opens the property for editing in a modal overlay.
214
+
-`ModalSize` (optional): If `EditMode` is `modal`, this controls the size of the modal.
215
+
- Applicable modal sizes are `small`, `medium`, `large` and `full`. Default is `large`.
> Notice the overlap with the previous example script. A combined script can be found [right here](https://github.com/kjac/Kjac.HeadlessPreview/blob/main/src/Kjac.HeadlessPreview.Site/wwwroot/scripts/umb.preview.js).
285
297
286
-
The result is a hover effect around the editable properties. When they're clicked, the editor is sent to the "Content" view:
298
+
The result is a hover effect around the editable properties. When they're clicked, the editor is either sent to the Umbraco "Content" view, or a modal overlay opens up for editing the property:
287
299
288
300

289
301
@@ -296,11 +308,17 @@ For your viewing pleasure, here's a screencast that shows it all in action 😉
296
308
297
309
## Known limitations
298
310
299
-
### Segment support is missing
311
+
### Certain property editors vs. modal editing
312
+
313
+
For some property editors, the modal overlay editing just does not work. The Tags property editor is one, there might be others.
314
+
315
+
If all things fail, revert to using the `default` editing mode.
316
+
317
+
### Segment support is untested
300
318
301
-
At this point, the Umbraco UI does not support segments, which means this package can't support them either.
319
+
The V16 UI brought back segment support. At this point, segments are still largely untested with this package.
302
320
303
-
The package is prepared for segments, so theoretically, segmented preview should start working when segments become part of the UI - time will tell 🤞
321
+
It should work, though - let me know if you run into problems with segments.
0 commit comments