lexical icon indicating copy to clipboard operation
lexical copied to clipboard

[lexical-playground] [minor] Feature: turn single-file plugins `plugins/*Plugin/index.tsx` into `plugins/*Plugin.tsx`

Open vadimkantorov opened this issue 8 months ago • 4 comments

Similar to https://github.com/facebook/lexical/blob/main/packages/lexical-playground/src/plugins/TablePlugin.tsx

The import statements like import LinkPlugin from './plugins/LinkPlugin' do work with both single-file and directory style, but the non-index.tsx-named plugin files are a tiny bit more convenient to manage in custom user codebases which copy/sync these plugins code from Playground.

Out of 50 plugin dirs currently, only 13 plugins are multi-file, the remaining 37 are single-file index.tsx ones

vadimkantorov avatar Apr 02 '26 09:04 vadimkantorov

Can I work on this?

Vedthakar avatar Apr 05 '26 19:04 Vedthakar

This is a very low value and low priority task, that would be better done in conjunction with refactoring more of the code from plugins to extensions. I would focus on other issues.

etrepum avatar Apr 05 '26 20:04 etrepum

Promoting mature playground plugins to extensions (or even a single extension) would be awesome too!

vadimkantorov avatar Apr 08 '26 11:04 vadimkantorov

The same question holds for single-file extensions?

e.g. https://github.com/facebook/lexical/tree/main/packages/lexical-playground/src/plugins/MentionsExtension

Image

vadimkantorov avatar Aug 02 '26 13:08 vadimkantorov