Reputation: 1
I put in the code below and run the live server, but nothing is happening (empty document on live server). What to do?
I tried this in my index.html file and run the live server:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- You need to include the CSS for SVGEdit somewhere in your application -->
<link href="./svgedit-master/src/editor/svgedit.css" rel="stylesheet" media="all"></link>
</head>
<body>
<!-- svgedit container can be positioned anywhere in the DOM
but it must have a width and a height -->
<div id="container" style="width:100%;height:100vh"></div>
</body>
<script type="module">
/* You need to call the Editor and load it in the <div> */
import Editor from './Editor.js'
/* for available options see the file `docs/tutorials/ConfigOptions.md` */
const svgEditor = new Editor(document.getElementById('container'))
/* initialize the Editor */
svgEditor.init()
/* set the configuration */
svgEditor.setConfig({
allowInitialUserOverride: true,
extensions: [],
noDefaultExtensions: false,
userExtensions: []
})
</script>
</html>
Upvotes: 0
Views: 115