Installation

There are two ways of integrating the Shakr Editor SDK - either by using the NPM package or by adding the <script> tag to your HTML file directly. Both methods allows you to create an instance of the editor using the createShakrEditor() function.

Using NPM Package#

npm install @shakrmedia/editor-sdk
import { loadEditorSDK } from '@shakrmedia/editor-sdk';
const editor = await createShakrEditor({
access_token: 'SCOPED_ACCESS_TOKEN',
render_session_id: 'RENDER_SESSION_ID',
...
});

Loading the <script> tag#

<script src="https://sdk.shakr.com/sdk.js" defer></script>
createShakrEditor({
access_token: 'ACCESS_TOKEN',
render_session_id: 'RENDER_SESSION_ID'
}).then(function(editor) {
// Use the editor instance
});