<script src="https://cloud.squidex.io/scripts/editor-sdk.js"></script>
<textarea name="content" id="content"></textarea>
<textarea name="context" id="context"></textarea>
var contentElement = document.getElementById('content');
var contextElement = document.getElementById('context');
// When the field is instantiated it notifies the UI that
var plugin = new SquidexPlugin();
// Init is called once with a context that contains
// the app name, schema name and authentication information.
plugin.onInit(function (context) {
contextElement.innerHTML = JSON.stringify(context, null, 2);
// The content is only available when it is used as a sidebar plugin for single content items.
plugin.onContentChanged(function (content) {
contentElement.innerHTML = JSON.stringify(content, null, 2);