Skip to content

Commit f6212e6

Browse files
committed
docs: add contained mode section to CLAUDE.md
1 parent a4bee7f commit f6212e6

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/superdoc/CLAUDE.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ Uses `layout-engine` for virtualized rendering with pagination.
5555
`PresentationEditor.ts` bridges state between modes.
5656
See `super-editor/src/core/presentation-editor/` for implementation.
5757

58+
### Fixed-height container embedding
59+
By default SuperDoc expands to the document's full height. To embed it inside a fixed-height container (panel, sidebar, modal, dashboard widget), pass `contained: true`. The parent element must have a definite height.
60+
61+
```javascript
62+
new SuperDoc({
63+
selector: '#editor',
64+
document: file,
65+
contained: true,
66+
});
67+
```
68+
5869
## Theming
5970

6071
SuperDoc UI is themed via `--sd-*` CSS variables. Use `createTheme()` for JS-based theming or set variables directly in CSS.
@@ -76,7 +87,6 @@ document.documentElement.classList.add(theme);
7687
- Preset themes — `src/assets/styles/helpers/themes.css`
7788
- Backward-compat aliases — `src/assets/styles/helpers/compat.css`
7889
- Consumer-facing agent guide — `AGENTS.md` (ships with npm package)
79-
8090
## Testing
8191

8292
- Unit tests: `src/SuperDoc.test.js`

0 commit comments

Comments
 (0)