https://github.com/dashpilot/svelte-pagebuilder-example
Example template for the svelte-pagebuilder repo
https://github.com/dashpilot/svelte-pagebuilder-example
Last synced: about 1 year ago
JSON representation
Example template for the svelte-pagebuilder repo
- Host: GitHub
- URL: https://github.com/dashpilot/svelte-pagebuilder-example
- Owner: dashpilot
- Created: 2023-02-28T12:59:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T22:46:16.000Z (about 3 years ago)
- Last Synced: 2025-01-14T12:48:52.843Z (over 1 year ago)
- Language: Svelte
- Homepage: https://svelte-pagebuilder-example.vercel.app
- Size: 7.03 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Svelte Pagebuilder
The editing has been designed to be completely separate from from the SPA on the page, and should work with any modern javascript framework (Svelte/Vue/React/Alpinejs, etc.). The communication between the editor and the SPA happens in two ways:
1. SPA to Editor (on page load)
On page load, the Editor loads the component configuration from `window.components`.
2. Editor to SPA (whenever the data changes)
Whenever the data changes, the editor calls the `window.relay(data)` function. You spa can hook into this function to update the page data.