AlessioGr / payload-plugin-lexical

Extends payload CMS with Meta's lexical RichText editor - a much more advanced and customizable richtext editor
MIT License
144 stars 6 forks source link

Payload 2.0 Migration Path #50

Open timofei-iatsenko opened 11 months ago

timofei-iatsenko commented 11 months ago

We've used this plugin in our PayloadCMS setup. Now we want to upgrade to Payload 2.0 but we've blocked by this plugin. The application just crashes when the plugin is included somewhere in the code, the issue is like here

So we decided to migrate to Payload's native lexical support.

I've found that data structure stored into the field in DB is pretty similar, but not the same. Payload 2.0 saves jsonContent directly into the field, where this plugin has an additional level in a structure.

I prepared a migration script which is going across all collections & globals and update field values accordingly, check this out here https://gist.github.com/thekip/eff1611f7957360be400c9ad23a83330

Unfortunately, after migrating the DB i've found that Payload's implementation is not that functional as in this plugin. It doesn't support Tables which we used and probably some other features, i did not test them all. But if your integration with lexical used only default set of features you would be good to go with my migration.

I'm continuing investigating...