GrapesJS Starter
by artur_arseniev
HTML
<script src="https://unpkg.com/grapesjs"></script>
<link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
<script src="https://unpkg.com/grapesjs-blocks-basic"></script>
<div id="gjs"></div>
CSS
body, html {
margin: 0;
height: 100%;
}
Babel + JSX
const html = '<br><br><a data-gjs-copyable="false" data-gjs-removable="false" href="http://google.com">Select and move me</a>';
var div = document.getElementById("gjs");
const editor = grapesjs.init({
container: '#gjs',
height: '400px',
storageManager: {type: 'none'},
plugins: ['gjs-blocks-basic'],
components: html
});
const updateAll = model => {
model.set({ draggable: false, toolbar: null })
model.initToolbar();
model.get('components').each(updateAll)
}
updateAll(editor.DomComponents.getWrapper())