pengzhanbo 385059f214
docs: update en docs (#708)
* docs: update en docs

* chore: tweak

* chore: tweak

* chore: tweak
2025-10-09 15:46:05 +08:00

1.3 KiB

title, icon, createTime, permalink
title icon createTime permalink
Code Sandbox lucide:codesandbox 2025/10/08 03:42:13 /en/guide/code/code-sandbox/

The theme supports embedding Code Sandbox in Markdown files.

Configuration

This feature is disabled by default. You can enable it in the configuration file.

export default defineUserConfig({
  theme: plumeTheme({
    markdown: {
      codesandbox: true, // [!code highlight]
    },
  })
})

Syntax

Basic Syntax

Embed Code Sandbox in the page:

@[codesandbox](id)

Use Code Sandbox redirect button:

@[codesandbox button](workspace/id)

Extended Options

@[codesanbox title="xxx" layout="Editor+Preview" height="500px" navbar="false" console](id#filepath)
  • id: Code Sandbox identifier
  • title: Code Sandbox title
  • layout: Code preview layout, options: Preview, Editor, Editor+Preview
  • height: Code preview height
  • navbar: Whether to display navigation bar, defaults to true
  • console: Whether to display console, defaults to false
  • filepath: File path

Examples

Code Sandbox redirect button:

@[codesandbox button](reaction/5wyzu)

Output:

@codesandbox button

Code Sandbox embedded in page:

@[codesandbox](5wyzu)

Output:

@codesandbox