facebook / facebook/lexical

Feature: Add the ability to define custom nodes to the Playground

Open
#3,949 1 comment 1 reaction 0 assignees View on GitHub
feature playground
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

Hi, I'd like to request a new Lexical Playground feature. I am currently troubleshooting some issues with custome lexical nodes and it has crossed my mind that it would be very cool to be able to create the minimum viable example of the custom node and load the code into the Lexical Playground and have the editor there be aware of the custom node.

I am not too experienced with Lexical yet so I am not sure if it is suitable for code editing, but if so, there could be another tab for the custom node source code which would live-reload the custom node in the main editor. If Lexical is not suitable for source code editing, CoreMirror or Monaco could be used instead.

This live reload of the custom node being played around with would allow for immediate feedback while developing custom nodes and make the whole process easier. Also, as a stretch goal of sorts, maybe the custom node code could be shareable in a fashion similar to the TypeScript Playground. You see a lot of Stack Overflow TypeScript questions with TypeScript Playground links. Maybe a similar thing could work for Lexical and the Lexical issue template could prompt reporters to consider reproducing their issue on the Playground and send a Playground link if they are able to.

Let me know if you see this as possibly in scope and feasible. Thank 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.