Skip to content

feat: persist data in preview and editor on astro page - #529

Open
hilhorstt wants to merge 3 commits into
mainfrom
feat/persist-data-in-preview
Open

feat: persist data in preview and editor on astro page#529
hilhorstt wants to merge 3 commits into
mainfrom
feat/persist-data-in-preview

Conversation

@hilhorstt

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
editor Ready Ready Preview Jul 13, 2026 12:59pm

Request Review

@sonarqubecloud

Copy link
Copy Markdown

@hilhorstt
hilhorstt marked this pull request as ready for review July 14, 2026 07:38
@hilhorstt
hilhorstt requested a review from a team as a code owner July 14, 2026 07:38
@hilhorstt
hilhorstt enabled auto-merge (squash) July 14, 2026 08:11
content edited on the home page (persisted to localStorage) so the
preview reflects the user's own document.
-->
<script is:inline define:vars={{ storageKey: EDITOR_STORAGE_KEY }}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this script to the editorPersistence util as well? So all demo code is in the same file?

*/
async function getEditor(el: EditorHost): Promise<EditorLike | undefined> {
await customElements.whenDefined('clippy-editor');
for (let i = 0; i < 300 && !el.editor; i += 1) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there not a ready() or equivalent available from within the editor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants