Weave.js

WeaveStageDropAreaPlugin

Activate support to drop elements on the canvas

Overview

The WeaveStageDropAreaPlugin class that enables drag-and-drop support on the canvas Stage. It lets users drop files, assets, or custom elements directly onto the canvas, triggering configurable actions like creating new nodes, importing images, or inserting custom components.

This plugin enhances usability by providing a natural, intuitive way for users to bring external content into a Weave.js collaborative environment.

The class extends the WeavePlugin class

Name

This plugin name property value is stageDropArea.

Import

import { WeaveStageDropAreaPlugin } from "@inditextech/weave-sdk";

Instantiation

new WeaveStageDropAreaPlugin();

TypeScript types

type WeaveStageDropPluginOnStageDropEvent = DragEvent;

Events

onStageDrop

onStageDrop: WeaveStageDropPluginOnStageDropEvent;

The onStageDrop event is called when the user drops an element on the stage.