ux icon indicating copy to clipboard operation
ux copied to clipboard

[Text Editor] Adding Lexical as ux packages

Open ahmedyakoubi opened this issue 3 years ago • 7 comments

Lexical is a new text editor created by facebook team . this is a demo to show case and this is the library .

I read a tweet about it and i feel like this is the text editor that symfony ux needs . here is the tweet .

ahmedyakoubi avatar Apr 14 '22 00:04 ahmedyakoubi

Seems like a very shaky reason to use a specific editor "I read a tweet so it must be good". Not only are there editors with proven track records and big teams but better documentation, and more complete feature set and plugin ecosystem.

If you want to use this editor there is nothing stopping you, but I don't see any argument why symfony needs to use this one.

excitedbox avatar May 07 '22 16:05 excitedbox

this not my reason ... i sent the tweet just to show all the features that text editor supports ...also it's used by facebook wich is a big company. you can check the docmuntation if you want . by the way symfony ux looking for a text editor and i'm trying to help with a great one ...took your time and read doc. if you find any other options (free text editor) please share here .

ahmedyakoubi avatar May 08 '22 01:05 ahmedyakoubi

It looks very nice. My only pushback might be that a UX component could be overkill. From a quick look at the docs, you set it up via:

import {createEditor} from 'lexical';

const config = {
  theme: {
    ...
  },
  onError: console.error
};
const editor = createEditor(config);

const contentEditableElement = document.getElementById('editor');
editor.setRootElement(contentEditableElement);

We could certainly create a Stimulus controller where initialize it via:

<div {{ stimulus_controller('symfony/ux-lexical', { theme: {...} }) }}>

But that doesn't offer that much. That being said, we do have other packages that are quite small. So, this might be something we could do - if someone wanted to open a PR.

Cheers!

weaverryan avatar May 16 '22 13:05 weaverryan

Quoting the first sentence of their readme:

:warning: Lexical is currently in early development and APIs and packages are likely to change quite often.

So to me, this is too early to add it as a symfony-ux package (as it would force symfony/ux to release new major version each time they make a breaking change in their experimental package to reflect that)

stof avatar Jun 01 '22 15:06 stof

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Apr 26 '24 12:04 carsonbot

Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3

carsonbot avatar May 11 '24 08:05 carsonbot

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

carsonbot avatar May 25 '24 14:05 carsonbot