Issue #1620Opened November 29, 2018by mathiasbc0 reactions

[Question] Can't edit Text on Block

Question

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 ?

Answers (2)

artfDecember 1, 20180 reactions

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]December 1, 20190 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.