From 5705717f32320e4e16b013a9d8716ebaf67a2070 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 10:04:06 +0000 Subject: [PATCH 1/3] Initial plan From acf6ae6cfc52954418ab5eda3a837c0dde2e2cd9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 10:09:40 +0000 Subject: [PATCH 2/3] Add documentation for Monaco editor height property Co-authored-by: kermanx <63178754+kermanx@users.noreply.github.com> --- docs/features/monaco-editor.md | 13 +++++++++++++ docs/features/monaco-run.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) 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%'}`. diff --git a/docs/features/monaco-run.md b/docs/features/monaco-run.md index d8eb730295..cc36a3102d 100644 --- a/docs/features/monaco-run.md +++ b/docs/features/monaco-run.md @@ -41,4 +41,17 @@ console.log('Shown after 1 click') ``` ```` +## 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-run} {autorun:false, 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%'}`. + Currently, Slidev supports running JavaScript and TypeScript code out-of-box. Refer to [Custom Code Runners](/custom/config-code-runners) for custom language support. From 7305e05f08561794e0d399c33363f7d8e32c060c Mon Sep 17 00:00:00 2001 From: _Kerman Date: Fri, 14 Nov 2025 18:11:23 +0800 Subject: [PATCH 3/3] Discard changes to docs/features/monaco-run.md --- docs/features/monaco-run.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/docs/features/monaco-run.md b/docs/features/monaco-run.md index cc36a3102d..d8eb730295 100644 --- a/docs/features/monaco-run.md +++ b/docs/features/monaco-run.md @@ -41,17 +41,4 @@ console.log('Shown after 1 click') ``` ```` -## 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-run} {autorun:false, 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%'}`. - Currently, Slidev supports running JavaScript and TypeScript code out-of-box. Refer to [Custom Code Runners](/custom/config-code-runners) for custom language support.