michael / editable-website

A SvelteKit template for building CMS-free editable websites
https://editable.website
MIT License
1.34k stars 103 forks source link

Lazy load editor components #8

Closed nilskj closed 1 year ago

nilskj commented 1 year ago

First step for improvements based on #6 . This PR introduces some awaited / lazy loaded components for the Editor parts. To simplify for all the pages using the editor tools we wrap the controls under the same name EditorToolbar that forwards all props and events to an inner lazy loaded component EditorControls.

PlainText, RichText and Image will all be lazy loading their inner parts.

nilskj commented 1 year ago

This actually solves this bug as well (#2) since we are lazy loading the editor components and don't render them server side. I cannot reproduce that bug with this addition.