Issue #1620💬 AnsweredOpened November 29, 2018by mathiasbc0 reactions

Can't edit Text on Block

快速解答by artf

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/

Read full answer below ↓

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, 2018

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, 2019

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.