Skip to content

Commit fe0dd30

Browse files
committed
PKP Sciflow TEST : initial intehration of editor via component demo
1 parent 17d275e commit fe0dd30

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

js/load.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,17 @@ function pkpCreateVueApp(createAppArgs) {
293293
return vueApp;
294294
}
295295

296+
// Need to add this before the export of sciflow editor com
297+
async function loadSciflowEditor() {
298+
if (!window.sciflowEditorLoaded) {
299+
const sciflowBase = '/lib/ui-library/node_modules/@sciflow/component-demo';
300+
await import(/* @vite-ignore */ `${sciflowBase}/polyfills.js`);
301+
await import(/* @vite-ignore */ `${sciflowBase}/main.js`);
302+
window.sciflowEditorLoaded = true;
303+
}
304+
return window.sciflowEditorLoaded;
305+
}
306+
296307
export default {
297308
Vue: pkpCreateVueApp({}),
298309
// making vue functions available via pkp.modules.vue for plugins
@@ -321,4 +332,5 @@ export default {
321332
vueMixins: {
322333
dialog,
323334
},
335+
loadSciflowEditor,
324336
};

0 commit comments

Comments
 (0)