npm.io
0.1.1 • Published 5 years ago

rete-selection-plugin

Licence
GPL-3.0-or-later
Version
0.1.1
Deps
0
Size
120 kB
Vulns
0
Weekly
0
Stars
6

rete-selection-plugin

CI

select more nodes at once

Capture

Usage

Install

npm i rete-selection-plugin --save
Basic
import SelectionPlugin from 'rete-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-selection-plugin'
editor.use(SelectionPlugin, {
  enabled: true,
  selectionMode: {
    className: 'text-weight-light custom-selection-pos'
  },
  mode: ['单选模式 (按下 ctrl 进入[多选模式])', '多选模式 (释放 ctrl 进入[单选模式])']
})