facebook / facebook/lexical

Feature: allow replacing a node with another node that is not a subclass of it

Open
#5,000 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

Currently node replacement only allow to replace a node with another node that is subclass of the node you are trying to replace,, but this isn't always the case, for example in my case i needed to make a new paragraph node that extending from the element node directly and i can't replace the original paragraph node with my node

**Alternative Solution:**
I can add a transform that replaces any paragraph node with my node

**NOTE**: I would love to make a PR if that is okay with you

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.