You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
700 B
24 lines
700 B
'use strict';
|
|
|
|
import {setupResponsiveness} from './toolbar/responsive.jsx';
|
|
import {setupPublish} from "./toolbar/publish.jsx";
|
|
import {setupDataOptions} from "./toolbar/data-options/DataOptions.jsx";
|
|
|
|
const previewFrame = document.getElementById('preview_frame');
|
|
const rootAttributes = {
|
|
previewFrame,
|
|
}
|
|
|
|
setupResponsiveness(rootAttributes);
|
|
setupDataOptions(rootAttributes);
|
|
setupPublish(rootAttributes)
|
|
|
|
window.addEventListener('message', function (e) {
|
|
const RESIZE_CODE = 'resize:';
|
|
if (typeof e.data !== 'string' || !e.data.startsWith(RESIZE_CODE)) {
|
|
return;
|
|
}
|
|
|
|
const data = JSON.parse(e.data.substring(RESIZE_CODE.length))
|
|
previewFrame.style.height = data.height + 'px';
|
|
});
|
|
|