codex-team / codex-team/editor.js

add beforeDestroy to control the deletion of selected blocks

Open
#2,632 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Sometimes we need to prevent the deletion of certain selected blocks, but the framework does not currently support this feature

Expected behavior:
Support preventing the deletion of certain selected blocks.

To do this, we can prevent deletions by adding the **_beforeSelectedDestroy_** hook function which return -1.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.