
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
docusaurus-plugin-drawio
Advanced tools
support to use draw.io in your website
npm i docusaurus-plugin-drawio
plugins: [
['drawio', {}],
],
in foo.mdx file
import Drawio from '@theme/Drawio'
import simpleGraph from '!!raw-loader!./drawio-graph/simple.drawio';
<Drawio content={simpleGraph} />
if your drawio file has many pages and you want to select which display by default,
you can set page props
import Drawio from '@theme/Drawio'
import simpleGraph from '!!raw-loader!./drawio-graph/simple.drawio';
<Drawio content={simpleGraph} page={1} />
default viewer.js cdn is
https://cdn.jsdelivr.net/npm/docusaurus-plugin-drawio/viewer.min.js
plugins: [
['drawio', { lib: 'http://domain/path/viewer.js' }],
],
drawio supports many configurations, many of which I don't know what the meaning is, and I don't know the type of the corresponding value. If you know, welcome to submit a pull request
| prop | meaning | type |
|---|---|---|
| page | page to be displayed | number |
| toolbar | The toolbar can be configured through this property, for example: "zoom layers tags lightbox" | string |
| pageId | page to be displayed | string |
| zoom | set zoom ratio | number |
| maxHeight | the max height of graph | number |
| forceCenter | I don't know the meaning of this configuration | boolean |
| center | I don't know the meaning of this configuration | boolean |
| responsive | I don't know the meaning of this configuration | boolean |
| border | I don't know the meaning of this configuration | any |
| move | I don't know the meaning of this configuration | any |
| nav | I don't know the meaning of this configuration | boolean |
| tooltips | I don't know the meaning of this configuration | any |
| resize | I don't know the meaning of this configuration | boolean |
| layers | I don't know the meaning of this configuration | any |
| layerIds | I don't know the meaning of this configuration | any |
| target | I don't know the meaning of this configuration | any |
| highlight | I don't know the meaning of this configuration | string |
| lightbox | I don't know the meaning of this configuration | any |
| editable | I don't know the meaning of this configuration | any |
| edit | I don't know the meaning of this configuration | any |
| editFunc | I don't know the meaning of this configuration | any |
| autoFit | I don't know the meaning of this configuration | any |
| autoCrop | I don't know the meaning of this configuration | any |
| autoOrigin | I don't know the meaning of this configuration | any |
| allowZoomOut | I don't know the meaning of this configuration | any |
| allowZoomIn | I don't know the meaning of this configuration | any |
| checkVisibleState | I don't know the meaning of this configuration | any |
| toolbarPosition | I don't know the meaning of this configuration | any |
| toolbarNohide | I don't know the meaning of this configuration | any |
| toolbarButtons | I don't know the meaning of this configuration | any |
https://xiguaxigua.com/docusaurus-plugin-drawio
There are many way to edit such as https://app.diagrams.net/ or vscode plugin
FAQs
> support to use draw.io in your website
The npm package docusaurus-plugin-drawio receives a total of 2,371 weekly downloads. As such, docusaurus-plugin-drawio popularity was classified as popular.
We found that docusaurus-plugin-drawio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.