Commit f67e225
authored
docs(structured-content): add lock mode documentation (#2077)
* docs(structured-content): add lock mode documentation
Document the w:lock support for structured content nodes:
- Add lockMode attribute and lock modes section to extension docs
- Add StructuredContentLockMode type definition
- Add code examples for inserting and updating lock modes
- Update interactive demo with lock/unlock buttons
- Update template builder docs with lockMode in field definitions
* docs(template-builder): revert lock mode additions
Template builder does not support lockMode in FieldDefinition or
TemplateField types yet. Remove premature documentation.
* fix(docs): remove lockMode from interactive demo buttons
lockMode is not yet available in the published editor version.
Restore original block field and update buttons that work today.
* docs(structured-content): add lock/unlock buttons to interactive demo
Add buttons to lock and unlock both inline and block fields using
updateStructuredContentById with lockMode attribute.
* docs(structured-content): improve interactive demo example text
Replace placeholder quote with a realistic service agreement template
that demonstrates practical use of inline and block fields.
* docs(structured-content): use sdtLocked on insert buttons
Insert inline and block fields with sdtLocked by default. Add
sdtContentLocked lock buttons for both field types and a single
unlock-all button.
* docs(structured-content): add live SDT fields to interactive demo
Use onReady callback to auto-insert inline and block sdtLocked fields
into the example document on load, replacing placeholder text with
real structured content fields. Reorganize buttons into logical groups:
update actions, lock mode actions, and delete.
* fix(docs): remove lockMode from onReady SDT insertions
lockMode is not available in the published version yet (PR #1939).
Remove it from onReady field insertions so the demo works with the
current superdoc@latest on unpkg.
* fix(docs): remove lock/unlock buttons from interactive demo
Lock mode buttons depend on PR #1939 which isn't published yet.
Remove them until lockMode is available in superdoc@latest.
* fix(docs): restore lockMode in demo — feature is published
lockMode is available in superdoc@latest (v1.13.1). Restore
sdtLocked on onReady field insertions and lock/unlock buttons.
* Revert "fix(docs): restore lockMode in demo — feature is published"
This reverts commit 53638cd.
* docs(structured-content): add toggle lock buttons for inline and block
* fix(docs): access node.attrs for lock toggle state detection
getStructuredContentTags returns {node, pos} objects — attrs are on
node.attrs, not directly on the object.
* fix(docs): use setNodeAttribute for lock toggle to bypass filterTransaction
updateStructuredContentById uses replaceWith which creates a ReplaceStep
that the lock plugin blocks. Use tr.setNodeAttribute instead, which
creates an AttrStep that the lock plugin explicitly skips.
* docs(structured-content): address review feedback
- Differentiate lock mode insert example from command section example
(use sdtContentLocked/Account ID instead of duplicate sdtLocked/Customer Name)
- Wrap enforcement details in Expandable for scannability
- Add missing `group` to block insert attrs type
- Replace raw tr.setNodeAttribute with updateStructuredContentById in demo
* docs(structured-content): remove toggle lock buttons from demo1 parent 0f58118 commit f67e225
2 files changed
Lines changed: 289 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
49 | 142 | | |
50 | 143 | | |
51 | 144 | | |
52 | 145 | | |
53 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
54 | 183 | | |
55 | 184 | | |
56 | 185 | | |
| |||
62 | 191 | | |
63 | 192 | | |
64 | 193 | | |
65 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
66 | 231 | | |
67 | 232 | | |
68 | 233 | | |
| |||
78 | 243 | | |
79 | 244 | | |
80 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
81 | 293 | | |
82 | 294 | | |
83 | 295 | | |
| |||
456 | 668 | | |
457 | 669 | | |
458 | 670 | | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
459 | 677 | | |
460 | 678 | | |
461 | 679 | | |
| |||
466 | 684 | | |
467 | 685 | | |
468 | 686 | | |
469 | | - | |
| 687 | + | |
470 | 688 | | |
471 | 689 | | |
472 | 690 | | |
| |||
480 | 698 | | |
481 | 699 | | |
482 | 700 | | |
483 | | - | |
| 701 | + | |
484 | 702 | | |
485 | 703 | | |
486 | 704 | | |
| |||
497 | 715 | | |
498 | 716 | | |
499 | 717 | | |
500 | | - | |
| 718 | + | |
501 | 719 | | |
502 | 720 | | |
503 | 721 | | |
| |||
0 commit comments