diff --git a/docs/features/monaco-editor.md b/docs/features/monaco-editor.md index a2d9cf7c4e..508733cd0f 100644 --- a/docs/features/monaco-editor.md +++ b/docs/features/monaco-editor.md @@ -34,3 +34,16 @@ console.log('Original text') console.log('Modified text') ``` ```` + +## Editor Height + +By default, the Monaco editor has a fixed height based on the initial content. If you start with an empty or small code block and want the editor to automatically grow as you type more code, you can set `{height:'auto'}`. + +````md +```ts {monaco} {height:'auto'} +// The editor will automatically grow as you type more code +console.log('Hello, World!') +``` +```` + +You can also set a specific height using CSS units like `{height:'300px'}` or `{height:'100%'}`.