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

[Question] Can't edit Text on Block #1620

Closed mathiasbc closed 5 years ago

mathiasbc commented 5 years ago

I wrote a plugin that defines a new Block for a simple headline.

editor = grapesjs.init({
      container: '#gjs',
      plugins: ['RJBlocks'],
)};
export default grapesjs.plugins.add('RJBlocks', (editor, options) => {
  // Text is not editable for some reason
  bm.add('headline', {
    label: 'Headline',
    activeOnRender: 1,
    content: {
      type: 'text',
      content: '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;min-width:100%">' +
        '<tr>' +
          '<td width="15" style="width:15px">&nbsp;</td>' +
          '<td align="left" style="color:#000001;font-family:Arial, sans-serif;font-size:24px;font-weight:bold;line-height:30px">Text Here</td>' +
          '<td width="15" style="width:15px">&nbsp;</td>' +
        '</tr>' +
      '</table>',
    },
  });
})

However when I drag and drop this block to the canvas I get the placeholder text Text Here and I am not able to edit it.

What am I missing ?

artf commented 5 years ago

I get the placeholder text Text Here

??? no, it's not a placeholder text, this is what you wrote inside your table...

I am not able to edit it

It works here https://jsfiddle.net/7oeh2man/

lock[bot] commented 4 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.