package updates

This commit is contained in:
JFH
2023-10-12 23:03:50 +02:00
parent 0895235c17
commit 94068b80b7
4 changed files with 1635 additions and 805 deletions

View File

@@ -27,29 +27,30 @@
-->
<div id="container" style="width:100%;height:100vh"></div>
</body>
<!-- If you do not wish to add extensions by URL, you can add calls
<!-- If you do not wish to add extensions by URL, you can add calls
within the following file to svgEditor.setConfig -->
<script type="module">
import Editor from './Editor.js'
/* for available options see the file `docs/tutorials/ConfigOptions.md */
const svgEditor = new Editor(document.getElementById('container'))
svgEditor.init()
svgEditor.setConfig({
allowInitialUserOverride: true,
extensions: [],
noDefaultExtensions: false,
userExtensions: [/* { pathName: '/packages/react-test/dist/react-test.js' } */]
})
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
/* globals XDOMAIN */
try { // try clause to avoid js to complain if XDOMAIN undefined
if (XDOMAIN) {
svgEditor.setConfig({
canvasName: 'xdomain', // Namespace this
allowedOrigins: [ '*' ]
})
console.info('xdomain config activated')
}
} catch (error) { /* empty fn */ }
</script>
</html>
<script type="module">
import Editor from './Editor.js'
/* for available options see the file `docs/tutorials/ConfigOptions.md */
const svgEditor = new Editor(document.getElementById('container'))
svgEditor.setConfig({
allowInitialUserOverride: true,
extensions: [],
noDefaultExtensions: false,
userExtensions: [/* { pathName: '/packages/react-test/dist/react-test.js' } */]
})
svgEditor.init()
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
/* globals XDOMAIN */
try { // try clause to avoid js to complain if XDOMAIN undefined
if (XDOMAIN) {
svgEditor.setConfig({
canvasName: 'xdomain', // Namespace this
allowedOrigins: ['*']
})
console.info('xdomain config activated')
}
} catch (error) { /* empty fn */ }
</script>
</html>