diff --git a/playground/src/pages/Editor.vue b/playground/src/pages/Editor.vue index 0925b704..76629944 100644 --- a/playground/src/pages/Editor.vue +++ b/playground/src/pages/Editor.vue @@ -55,6 +55,7 @@ import { type MenuBarData, type MenuButton, type MoveableOptions, + propsService, type Services, TMagicEditor, } from '@tmagic/editor'; @@ -125,9 +126,9 @@ const usePasteMenu = (menu?: Ref | undefined>): const initialTop = calcValueByFontsize(stage?.renderer.getDocument(), (rect.top || 0) - (parentRect?.top || 0)) / services.uiService.get('zoom'); - services?.editorService?.paste({ left: initialLeft, top: initialTop }); + services?.editorService?.paste({ left: initialLeft, top: initialTop }, collectorOptions); } else { - services?.editorService?.paste(); + services?.editorService?.paste({}, collectorOptions); services?.codeBlockService?.paste(); services?.dataSourceService?.paste(); } @@ -310,6 +311,10 @@ editorService.usePlugin({ }, }); +propsService.usePlugin({ + beforeFillConfig: (config) => [config, '100px'], +}); + onBeforeUnmount(() => { editorService.removeAllPlugins(); });