{"repo":"2wheeh/lexical-nextjs-ssr","free":true,"listed":false,"github":"https://github.com/2wheeh/lexical-nextjs-ssr","clone":"git clone https://github.com/2wheeh/lexical-nextjs-ssr.git","description":"PoC","language":"TypeScript","stars":18,"topics":["editor","lexical","nextjs","richtext","rte","ssr"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"This is a simple PoC for running Lexical on Next.js to achieve the following: - SSR the read mode for SEO. You can inspect the rendered HTML by the headless editor from the nextjs server in the network tab of your browser's devTools. - Editable on the client side for smooth UX. https://github.com/2wheeh/lexical-nextjs-ssr/assets/40269597/ecf1b914-ae8d-494b-a87e-b2033fb2bf13 Demo: lexical-nextjs-ssr.vercel.app Background While implementing a service with Lexical, you must decide how to serialize data for saving in a repository. There are several options, but the two main ones are HTML vs JSON (lexical-docs-serialization). For Lexical, I believe that JSON is a better option for the following reasons: Lexical injects the theme through class attributes into the exported/created HTML elements (lexical-docs-theming). It provides flexibility when data is separated from the theme. This is why I prefer JSON over HTML for saving data - you can change styling policies and make necessary adjustments in the CSS without affecting the data. Saving HTML in your repository may seem well-separated as well. However, issues arise for backward compatibility when you want to change the name of a class. Existing data might not be styled correctly. For example, injecting TailwindCSS utility classes directly on theming or changing the strategy from not utilizing theme (such as TryGhost/Keonig) to utilizing it (such as lexical-playground) could break the CSS if you save data as HTML. For these reasons","default_branch":null,"files":null,"tree":[],"storefront":"/r/2wheeh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/2wheeh/lexical-nextjs-ssr/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}