mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
896 B
896 B
JSFiddle Embed
Embed JSFiddle demos in your markdown files.
Configuration
Enable in .vuepress/config.ts:
export default defineUserConfig({
theme: plumeTheme({
markdown: {
jsfiddle: true
}
})
})
Syntax
@[jsfiddle](fiddle_id)
@[jsfiddle](fiddle_id title)
@[jsfiddle](fiddle_id title tabs)
Parameters
fiddle_id- The JSFiddle fiddle IDtitle- Optional title for the embedtabs- Optional tabs to show:js,css,html,result(comma-separated)
Example
Input:
@[jsfiddle](abc123)
@[jsfiddle](abc123 "My Fiddle")
@[jsfiddle](abc123 "My Fiddle" html,css,result)
Getting Fiddle ID
- Open the JSFiddle
- Copy the ID from the URL:
jsfiddle.net/username/XXXXXX/ - Use
XXXXXXas the fiddle ID
Features
- Embedded fiddle preview
- Tab-based navigation
- Live code editing
- Result preview