ux
ux copied to clipboard
[Text Editor] Adding Lexical as ux packages
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 .
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.
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 .
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!
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)
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
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
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!