Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-restricted-editing

Package Overview
Dependencies
Maintainers
1
Versions
690
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-restricted-editing

Restricted editing feature for CKEditor 5 editors.

  • 0.0.0-nightly-20230921.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
131K
decreased by-43.25%
Maintainers
1
Weekly downloads
 
Created

What is @ckeditor/ckeditor5-restricted-editing?

@ckeditor/ckeditor5-restricted-editing is a plugin for CKEditor 5 that allows you to restrict editing to specific parts of the content. This is useful for scenarios where you want to protect certain parts of the document from being modified by users while allowing them to edit other parts.

What are @ckeditor/ckeditor5-restricted-editing's main functionalities?

Enable Restricted Editing Mode

This code initializes the CKEditor with the Restricted Editing Mode plugin enabled. It adds the 'restrictedEditing' button to the toolbar, allowing users to toggle the restricted editing mode.

ClassicEditor.create(document.querySelector('#editor'), { plugins: [ RestrictedEditingMode, ... ], toolbar: [ 'restrictedEditing', ... ] })

Mark Editable Regions

This code marks a specific range in the document as an editable region. Users will be able to edit only within this range when the restricted editing mode is enabled.

editor.execute('restrictedEditingException', { commandParams: { range: editor.model.createRange(editor.model.createPositionAt(editor.model.document.getRoot(), 0), editor.model.createPositionAt(editor.model.document.getRoot(), 5)) } })

Toggle Restricted Editing Mode

This code toggles the restricted editing mode on or off. When enabled, users can only edit the marked editable regions.

editor.execute('restrictedEditing')

Other packages similar to @ckeditor/ckeditor5-restricted-editing

Keywords

FAQs

Package last updated on 21 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc