You can use
Polotno tools and ability to customize side panel to make your own library of templates.
In order to make a templates library you will need:
- Create a design in the
store.toJSON()to save the design state on computer as
- (Optionally) Use
store.saveAsImage()to save preview file of a design
- Repeat 1-4 as many times as you need in order to make a library of templates
- If you skipped step number 3 you can use
polotno-nodeto generate previews automatically
- Make server side API to access list of templates
- Create a custom side panel to display list of templates from that API
These are manual steps with human creativity involved. You should use your own polotno-made editor. Or you can use https://studio.polotno.dev/ if you want. You can use "Save" button to download
Now you need to create as many files as you need for your library.
We can use
polotno-node API to quickly generate small previews the whole library.
I will show you a quick NodeJS script that will read load directory and create previews for every json file in it.
When script is finished we will have a folder where designs (json files) and previews (png files).
This step is out of polotno scope. You can use any backend stack you like. Most likely you will need API to get a list of available templates. For every design you will need to share public path to
json file and
For the demo bellow I will just mock API with static json.
As soon as you have backend API to get list of templates, you can use Side Panel Customization to display that list on the page.
The side panel may look like this: