Lexical plugin v1.x vs LexicalEditor v2.0

default discord avatar
gammasennin
last month
10

In Payload cms v1 we had the lexical plugin that was a bit more powerful then the slate default editor.


https://github.com/AlessioGr/payload-plugin-lexical

In Payload cms v2 we have the lexicalEditor as package to install and configure as default rich text editor.


@payloadcms/richtext-lexical

Yet when I configure and start to use it, it has different feature config and visual appearance.



1. It seams paragraph style features like headings are not properly working or have no style. 🐛


2. What I currently miss most is the Tex Equations feature.


3. As we all know it has not much documentation, so its hard to find its way.



It is marked in beta, so it might not be highest prio, but is there a timeline on which lexical features should receive fixes and support any time soon?

  • discord user avatar
    alessiogr
    Payload Team
    last month

    Hi there, I think this should answer some of your questions:

    https://discordapp.com/channels/967097582721572934/967097582721572937/1160886224882503730

    It seams paragraph style features like headings are not properly working or have no style

    Not aware of this, could you send me a screenshot?



    As we all know it has not much documentation, so its hard to find its way.

    Yep! Documentation will improve with time.



    There is no timeline for which lexical features will be added next and receive fixes. It's being worked on at this very moment and will get better & more feature-rich with time. Expect plenty of updates the coming days n weeks



    Focus at the moment is making sure all the features it currently has are working bug-free, and seamlessly. Once they have been perfected, more will be added

  • default discord avatar
    gammasennin
    last month

    Thx for coming back so quick 🚀



    I've just upgraded our setup of Payload CMS this morning to version 2.


    As our project is not yet in production, it only started recently. I dropped the db to keep it simple. so it gets recreated with v2 model.



    For our setup of RT we want to have a very limited set of standard features, so I've configured the features manually.


    Thats why I went without extending the default feature set, but I only kept h1 - h3 and normal text for paragraph style.



    Not aware of this, could you send me a screenshot?

    Happy to



    If I try to apply any paragraph style. h1 - h3, or also bring back the block-quote, nothing happens.


    The paragraph remains unformatted as seen on the screenshot from api data.

    image.png
    image.png
    image.png
  • discord user avatar
    alessiogr
    Payload Team
    last month

    hmm I'm just not able to reproduce it - I've tried it with the exact same lexical configuration as you



    here's a video



    and my config



    Is there anything else you're doing which might cause the issue? Any console errors?

  • default discord avatar
    gammasennin
    last month

    Found the reason for me, browser issues creeping up once more.



    Chrome

    Version 117.0.5938.149 (Official Build) (arm64)


    Setting Paragraph style like headings and alignment works. ✅


    Displaying Paragraph styles works. ✅



    Safari

    Version 15.3 (17612.4.9.1.8)


    Setting Paragraph style like headings and alignment works. ✅


    Displaying Paragraph styles works. ✅



    Firefox

    118.0.1 (64-bit)


    Setting Paragraph style like headings and alignments, Does not work. ❎


    Displaying Paragraph styles works. ✅



    I can not tell you a better reason for why Firefox fails as I'm not a frontend dev experienced with debugging such issues.

  • discord user avatar
    alessiogr
    Payload Team
    last month

    Firefox is becoming the new Safari lol



    That helps a lot, thank you!



    I'll try and get this fixed on Firefox

  • default discord avatar
    gammasennin
    last month

    There is an additional 🐛 with the RichText editor



    You can see that the

    Marketing Description

    is a RichText field.


    This field is part of a

    Sales And Marketing Information

    collection document that again is embedded as reference into an other type of document.



    Now if I open the

    Sales And Marketing Information

    as a create new document as a modal window over the related parent document view.


    The RichText toolbar is hidden behind this modal window.



    This 🐛 is independent from the used browser.

    image.png
  • discord user avatar
    alessiogr
    Payload Team
    last month

    could you open two issues for each bug on GitHub? Will make it a lot easier for me to keep track of them that way, thank you!!

  • default discord avatar
    gammasennin
    last month

    This within your plugin Repo?


    https://github.com/AlessioGr/payload-plugin-lexical

    Or is there a different repo for the payload 2.0 lexical implementation?

  • discord user avatar
    alessiogr
    Payload Team
    last month

    oh just the main payload repository!



    https://github.com/payloadcms/payload
  • default discord avatar
    gammasennin
    last month

    Solved in newst packages, thx this was FAST!

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.