Custom Template Generator
$ yarn add @vuerd/plugin-generate-template
or
$ npm install @vuerd/plugin-generate-template
import { extension } from 'vuerd';
import { generateTemplatePanel } from '@vuerd/plugin-generate-template';
extension({
panels: [generateTemplatePanel()],
});
<!DOCTYPE html>
<html>
<head>
<title>vuerd demo</title>
<style>
body {
margin: 0;
height: 100vh;
}
</style>
</head>
<body>
<erd-editor></erd-editor>
<script src="https://cdn.jsdelivr.net/npm/vuerd/dist/vuerd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@vuerd/plugin-generate-template/dist/generate-template.min.js"></script>
<script>
const { extension } = window['vuerd'];
const { generateTemplatePanel } =
window['@vuerd/plugin-generate-template'];
extension({
panels: [generateTemplatePanel()],
});
const editor = document.querySelector('erd-editor');
window.addEventListener('resize', () => {
editor.width = window.innerWidth;
editor.height = window.innerHeight;
});
window.dispatchEvent(new Event('resize'));
</script>
</body>
</html>