Repository navigation
Replies: 3 comments 4 replies
|
Hey @j-ro, thanks for the write-up and another great idea. I like it. Few things: It's already planned for Cloud, and a lot of the code is in the SDK today. Saving a block as a reusable unit, a browser to search/preview/insert saved blocks, and the headless create/list/update/delete logic already exist — they're just gated behind the Cloud backend right now. The editor-side UI is mostly shared code, not Cloud-specific. You can see the Cloud feature here (it's called Saved Modules in Cloud): https://cloud.templatical.com/features/saved-modules The reason it's planned for Cloud first is that the whole retrieve/save/delete flow requires a backend, a database, and tenant separation — a complete infrastructure. But reading your idea, since most of the required SDK code is already in place, I'm willing to open it up, document it, and allow it to be used with a BYO approach. It would work like you mentioned — similar to the media/image-upload hooks: you supply a storage "provider" (retrieve / create / update / delete) wired to your own backend however you like, and the editor handles the save button, the list, previews, and insertion. The editor owns the state and UI; you own the transport. As I said, most of the code is already in place, but hard-wired to the Cloud provider and authentication. To make it open, I need to define the provider interface in the open-source SDK so anyone can implement it against their own storage, then have Cloud consume that same interface as just one adapter. I'm also thinking of shipping a simple built-in provider (e.g. localStorage, browser-based) so it works out of the box with zero backend. One naming note for clarity: I'm calling this Saved Blocks. There's already a Custom Blocks feature, but that works differently and serves a different purpose — see: https://docs.templatical.com/guide/custom-blocks Folder organization and rename are on the list too, most likely as a follow-up once the core save, browse, and insert flow ships. Let me know what you think about this. Thanks again! |
|
Merged #451 and released new SDK version |
|
Hi @j-ro, Just a quick update since this relates to "Saved Block". I recently shipped huge BYO-Backend features, including
Check them out, I'm sure you'll like them. |
Uh oh!
There was an error while loading. Please reload this page.
The workflow I imagine is a user is creating in the editor, and they have something set up that they want to re-use, so they can click a save button and save that block. Then, when making blocks later, they see a list of saved blocks and can drag those in. And perhaps ways to manage the saved list (categorize in folders, delete, rename, etc...)
Backend actual saving could happen similar to, say, image uploads, with a javascript hook that triggers AJAX to the server to save the block, and population could happen on load via editor config or similar AJAX calls, but the save/display/drag in functionality would need to be done in the editor.
All reactions