adding row and sections not working
Question
i am integrating grapejs with angular6. but it is not working means it is not showing on blocks i am using following code
editor = grapesjs.init({
autorender: 0,
container: '#gjs',
components: '<div class="txt-red"></div>',
style: '.txt-red{color: red}',
})
let bm = editor.BlockManager
bm.add('the-row-block', {
label: '2 Columns',
category:'Basic',
content: '<div class="row" data-gjs-droppable=".row-cell" data-gjs-custom-name="Row">' +
'<div class="row-cell" data-gjs-draggable=".row"></div>' +
'<div class="row-cell" data-gjs-draggable=".row"></div>' +
'</div>',
});
Answers (3)
I would suggest that you upload an example to https://www.jsfiddle.net. This does not seem enough to give an answer.
You should add the style
content: `<div class="row">..
</div>
<style>
.row {
...
</style>`,
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #519
No Blocks by default
Using this code I get an editor but there are no blocks. I also do not get the icons for the screen size but other icons are there. As you...
Issue #507
uploadFile being called twice on drop file?
I have an editor initialized as so: If I add an image to the canvas and try to upload a new image by dragging it into the drop area in the...
Issue #1496
issue in adding new row cell in grapejs not working
i am using grapejs version 0.14.33 with angular 6 i want to add a section with 2 blocks on block manager as created on grapejs demo. and fo...
Issue #2018
BUG When import as module Angular 6
in Version: "grapesjs": "^0.14.61", "grapesjs-preset-newsletter": "^0.2.20", i import the script as: and the context is the code: And only...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.