Skip to content

WellerQu/rete-selection-plugin

Repository files navigation

rete-drag-selection-plugin

This is a fork of WellerQu/rete-selection-plugin

This plugin allows to select more nodes at once by pressing CTRL and dragging an area on the ReteJS editor.

Usage

Install

npm i rete-drag-selection-plugin --save

Basic

import SelectionPlugin from 'rete-drag-selection-plugin'
editor.use(SelectionPlugin, { enabled: true })

Advanced

export interface Cfg {
  /**
   * selection area's className for style
   */
  selectionArea?: {
    className?: string;
  };
  /**
   * selection mode's className for style
   */
  selectionMode?: {
    className?: string;
  };
  /**
   * enabled or disable selection
   * default false
   */
  enabled?: boolean;
  /**
   * mode text
   */
  mode?: [string, string];
}

import SelectionPlugin from 'rete-drag-selection-plugin'
editor.use(SelectionPlugin, {
  enabled: true,
  selectionMode: {
    className: 'text-weight-light custom-selection-pos'
  },
})

About

select more nodes at once

Resources

License

Stars

Watchers

Forks

Packages

No packages published