GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.06k forks source link

adding row and sections not working #1505

Closed himanshubudhlakoti closed 6 years ago

himanshubudhlakoti commented 6 years ago

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>',
});
mararn1618 commented 6 years ago

I would suggest that you upload an example to https://www.jsfiddle.net. This does not seem enough to give an answer.

artf commented 6 years ago

You should add the style

content: `<div class="row">..
    </div>
    <style>
        .row {
        ...
    </style>`,
lock[bot] commented 5 years ago

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.