0.0.4 • Published 4 years ago
vuepress-plugin-html-applet v0.0.4
Vuepress HTML Applet Plugin
Embed HTML Applet iframe to your Vuepress article.
Installation
yarn add vuepress-plugin-html-applet -D
# or
npm i vuepress-plugin-html-applet -DUsage
Add the following to your config.js:
module.exports = {
plugins: [
'html-applet',
// or
// ['html-applet', { useSrcdoc: true }],
]
}Write html code in markdown like this:
The first line of the HTML code block needs to contain the string --applet--.
```html
<!-- --applet-- -->
<div>
<h1>Hello World</h1>
<p>This is a simple applet.</p>
</div>
```Options
useSrcdoc: whether to usesrcdocattribute instead ofsrc. Default isfalse.showCode: whether to show the HTML code block. Default isfalse.