package updates
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user