diff --git a/packages/form-js-playground/src/Playground.js b/packages/form-js-playground/src/Playground.js index 7e8eefd55..97190b88c 100644 --- a/packages/form-js-playground/src/Playground.js +++ b/packages/form-js-playground/src/Playground.js @@ -12,6 +12,7 @@ import { PlaygroundRoot } from './components/PlaygroundRoot'; * * @typedef { { * actions?: { display: Boolean } + * additionalModules?: Array * container?: Element * data: any * editor?: { inlinePropertiesPanel: Boolean } diff --git a/packages/form-js-playground/src/components/PlaygroundRoot.js b/packages/form-js-playground/src/components/PlaygroundRoot.js index aaf0e23d7..3e3e19537 100644 --- a/packages/form-js-playground/src/components/PlaygroundRoot.js +++ b/packages/form-js-playground/src/components/PlaygroundRoot.js @@ -25,6 +25,7 @@ import './PlaygroundRoot.css'; export function PlaygroundRoot(props) { const { + additionalModules = [], // goes into both editor + viewer actions: actionsConfig = {}, emit, exporter: exporterConfig = {}, @@ -101,7 +102,10 @@ export function PlaygroundRoot(props) { }); const form = formRef.current = new Form({ - additionalModules: viewerAdditionalModules, + additionalModules: [ + ...additionalModules, + ...viewerAdditionalModules + ], properties: { ...viewerProperties, 'ariaLabel': 'Form Preview' @@ -124,7 +128,10 @@ export function PlaygroundRoot(props) { ...editorProperties, 'ariaLabel': 'Form Definition' }, - additionalModules: editorAdditionalModules + additionalModules: [ + ...additionalModules, + ...editorAdditionalModules + ] }); paletteRef.current = formEditor.get('palette');