Js Fiddle
About 143 wordsLess than 1 minute
2025-10-08
The theme supports embedding JS Fiddle in Markdown files.
Configuration
This feature is disabled by default. You can enable it in the configuration file.
.vuepress/config.ts
export default defineUserConfig({
theme: plumeTheme({
markdown: {
jsfiddle: true,
},
})
})
Syntax
Basic Syntax
@[jsfiddle](user/id)
Extended Options
@[jsfiddle theme="dark" tab="js,css,html,result" height="500px"](user/id)
user
: Usernameid
: JS Fiddle identifiertheme
: Theme mode, options:"light" | "dark"
tab
: Active tabs, options:"js" | "css" | "html" | "result"
, multiple values separated by","
. The order determines tab arrangement, defaults tojs,css,html,result
height
: Container height
Examples
Input:
@[jsfiddle](pengzhanbo/1xbwz2p9)
Output:
Input:
@[jsfiddle tab="result,js,css,html"](pengzhanbo/1xbwz2p9)
Output: