webiny / webiny-js

Open-source serverless enterprise CMS. Includes a headless CMS, page builder, form builder, and file manager. Easy to customize and expand. Deploys to AWS.
https://www.webiny.com
Other
7.32k stars 603 forks source link

There should be a lexical state to html converter for backend #3671

Closed burakksekerr closed 11 months ago

burakksekerr commented 11 months ago

Is your feature request related to a problem? Please describe.

We cant use react native client this package https://www.webiny.com/docs/headless-cms/integrations/render-lexical-rich-text-content. Lexical state is converted to html by a custom function.

Describe the feature's behavior.

No response

Describe alternatives you've considered.

No response

Pavel910 commented 11 months ago

@burakksekerr you're in luck :) We're releasing 5.38.0 this week, and it will contain a package which will help you do conversion from Lexical to HTML and vice-versa.

You can test it today by installing a beta version of the package: https://www.npmjs.com/package/@webiny/lexical-converter. The README is not complete, but you can see how it is supposed to be used in the tests. Check this test for conversion to HTML:

https://github.com/webiny/webiny-js/blob/next/packages/lexical-converter/__tests__/stateTransformer.test.ts#L139

burakksekerr commented 11 months ago

thnx :) @Pavel910

Pavel910 commented 9 months ago

@burakksekerr just to give you a quick update on this: the Lexical converter package is now available, but there are still some issues with using that within Lambda, which we plan to address in 5.39. release coming beginning of 2024. Keep an eye out on that release :)