@superdoc-dev/react 1.0.0-canary.6 → 1.0.0-canary.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,31 @@ All [SuperDoc config options](https://docs.superdoc.dev) are available as props,
|
|
|
75
75
|
| `className` | `string` | Wrapper CSS class |
|
|
76
76
|
| `style` | `CSSProperties` | Wrapper inline styles |
|
|
77
77
|
|
|
78
|
+
### Props That Trigger Rebuilds
|
|
79
|
+
|
|
80
|
+
These props cause the SuperDoc instance to be destroyed and recreated when changed:
|
|
81
|
+
|
|
82
|
+
- `document` - The document to load
|
|
83
|
+
- `user` - Current user identity
|
|
84
|
+
- `users` - List of users
|
|
85
|
+
- `modules` - Module configuration (collaboration, comments, etc.)
|
|
86
|
+
- `role` - User permission level
|
|
87
|
+
- `hideToolbar` - Toolbar visibility
|
|
88
|
+
|
|
89
|
+
### Props Handled Efficiently
|
|
90
|
+
|
|
91
|
+
These props are applied without rebuilding:
|
|
92
|
+
|
|
93
|
+
- `documentMode` - Calls `setDocumentMode()` internally
|
|
94
|
+
|
|
95
|
+
### Initial-Only Props
|
|
96
|
+
|
|
97
|
+
Other SuperDoc options (`rulers`, `pagination`, etc.) are applied only on initialization. To change them at runtime, use `getInstance()`:
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
ref.current?.getInstance()?.toggleRuler();
|
|
101
|
+
```
|
|
102
|
+
|
|
78
103
|
### Common Props
|
|
79
104
|
|
|
80
105
|
```tsx
|