Storing and processing Setka Editor files
There are 2 ways to store and process resources received from Setka Editor.
1. Storing links to resources, dynamic linking to Setka CDN
You can receive links to resources via API and save them to your database. Dynamically link resources to editor and preview pages. Update the links once there is a request for it.
Do not send Style Manager API requests each time you open your post. There are two cases when files can be changed:
1. When updating styles through Style Manager
2. When a new version of the editor is released
We recommend saving links in a database and updating them only if it is necessary. On getting a new set of files from editor.setka.io, make sure that it is valid. Delete the old style file and connect the new one only after validation.
2. Storing resources on your server or CDN
If you want Setka Editor files to be grabbed from your server or CDN, with no dependencies on Setka CDN, you can use links to download them and put them into a public directory of the project. Then you will be able to markup paths to files on required pages.
After the file update request (Step 4), you will need to download new versions and replace old files.
Files can be saved to your server or CDN:
File | Description |
theme_files | JSON config file and a concatenated CSS file |
standalone_styles | Standalone styles |
amp_styles | AMP styles |
fonts | Custom fonts |
icons | Icons |
Download custom fonts and icons to your server or CDN in any structure preferable for you.
After files download:
1. JSON config file: replace absolute paths that are referred to a Setka Editor domain with the absolute paths to icons on your domain or CDN
Example:
If the path leads to https://ceditor.setka.io/clients/client-ID/css/assets/file-ID/img/icon.svg
, replace it with https://yourdomain.com/assets/icons/icon.svg
.
2. Replace absolute paths for fonts in a concatenated or separate CSS file with the ones that lead to your CDN instead of the Setka Editor domain
Example:
If the path leads to https://ceditor.setka.io/clients/file-ID/css/assets/fonts/client-ID/font.woff
, replace it with https://yourdomain.com/assets/fonts/font.woff
.
Last updated