@serdoo/rete-readonly-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.4.1 • Public • Published

Rete readonly plugin

Rete.js plugin

import ReadonlyPlugin from 'rete-readonly-plugin';

 // the plugin creates a 'readonly' and 'isreadonly' events

editor.use(ReadonlyPlugin, { enabled: false }); // enabled is true by default

this.emitter.exist('isreadonly') // check if event exist, i.e. plugin installed

let readonlyEnabled = editor.trigger('isreadonly'); // get readonly state

editor.trigger('readonly', readonlyEnabled); // enable or disable readonly

editor.on('readonly', () => {}) // side effects when turning on / off the read-only mode

Readme

Keywords

none

Package Sidebar

Install

npm i @serdoo/rete-readonly-plugin

Weekly Downloads

1

Version

0.4.1

License

MIT

Unpacked Size

16.4 kB

Total Files

13

Last publish

Collaborators

  • cumali.dikmen
  • ahmetarifoz
  • gizem.senol
  • onurakman