0.1.1 • Published 4 years ago

rete-selection-plugin v0.1.1

Weekly downloads
4
License
GPL-3.0-or-later
Repository
github
Last release
4 years ago

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 进入[单选模式])']
})