This is a usage example of Shakr's Editor SDK in Node.js.
⚠️ Note: Shakr Editor SDK is only available to Shakr Beyond customers. Please contact your account representative to get your API credentials, including Client ID and Client Secret.
- Node.js 10 or up
Shakr Editor SDK only allows embedding inside secure domain that uses HTTPS. When you're testing locally, either use a browser like Firefox which you can ignore certificate error and proceed, or launch Chrome with --ignore-certificate-errors flag. Alternatively, you can modify the code to add your own self-signed certificate and add it to your system certificate store.
- Install Node.js dependecies via
npm install
oryarn install
. - Copy the example
.env
file (.env.exmaple
) to.env
and replace placeholders with your client ID, client secret. - Run Node.js server via
npm run start
oryarn start
. - Open
https://localhost:3000
in browser.
This Node.js source file contains functions to acquire server-side token, and create a Render Session object with template_style_version_id and edit_token option.
Example media library data for custom media library feature example. Example images from Unsplash
Most basic example that has codes to launch Shakr Editor with SDK.
Example code to launch SDK Shakr Editor with customized theme.
Example code to show render progress after finishing editing session and display download link after closing Shakr Editor.
This example has codes to prefill resource before launching Shakr Editor.
This example has codes to inject custom media library data into Shakr Editor UI.
This example has codes to show custom UI for media library.