Skip to content

[examples] Feature: sveltekit ssr example#7879

Merged
etrepum merged 9 commits intofacebook:mainfrom
etrepum:example-extension-sveltekit-ssr-hydration
Oct 2, 2025
Merged

[examples] Feature: sveltekit ssr example#7879
etrepum merged 9 commits intofacebook:mainfrom
etrepum:example-extension-sveltekit-ssr-hydration

Conversation

@etrepum
Copy link
Copy Markdown
Collaborator

@etrepum etrepum commented Sep 26, 2025

Description

Svelte 5 + Lexical Extension Demo

This example demonstrates how you can use Lexical Extension signals
reactively with a $ prefix because they comply with the Svelte Store API.

This example shows how you might do SSR to prerender the editor's HTML
and hydrate it client-side directly from the prerendered HTML (so you're not
sending the content twice). Note that this only works well when your importDOM
is lossless relative to the createDOM output.

It's also a rudimentary demo for how you can support Vite HMR to preserve
the editor's state during reloads (great for tweaking html/styles/etc.)

The README's stackblitz link won't work until merge but here's a version that will work from this PR's branch:
https://stackblitz.com/github/etrepum/lexical/tree/example-extension-sveltekit-ssr-hydration/examples/extension-sveltekit-ssr-hydration?file=src%2Froutes%2F%2Bpage.svelte

Test plan

Has some minimal e2e tests that run in the integration test suite

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Oct 2, 2025 2:47pm
lexical-playground Ready Ready Preview Comment Oct 2, 2025 2:47pm

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 26, 2025
@etrepum etrepum force-pushed the example-extension-sveltekit-ssr-hydration branch from 1c67ef0 to 3553e7a Compare September 26, 2025 23:57
@etrepum etrepum force-pushed the example-extension-sveltekit-ssr-hydration branch from 3553e7a to 9cd5b7f Compare September 27, 2025 00:16
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Sep 27, 2025
@etrepum etrepum force-pushed the example-extension-sveltekit-ssr-hydration branch from db06a28 to 8a8d674 Compare September 29, 2025 18:59
@etrepum etrepum force-pushed the example-extension-sveltekit-ssr-hydration branch from 002e542 to 9c533c1 Compare October 1, 2025 19:11
@etrepum etrepum changed the title [WIP][examples] Feature: sveltekit ssr example [examples] Feature: sveltekit ssr example Oct 1, 2025
@vercel
Copy link
Copy Markdown

vercel bot commented Oct 2, 2025

@etrepum is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@etrepum etrepum added this pull request to the merge queue Oct 2, 2025
Merged via the queue into facebook:main with commit 9bc5119 Oct 2, 2025
38 of 39 checks passed
@etrepum etrepum mentioned this pull request Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants