question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

make not removable elements inside a block

See original GitHub issue

Hello, Given:

editor.BlockManager.add(‘test-component’, { id: ‘MappaPiuDescrizione’, label: ‘Mappa + Descrizione’, content: <div data-blockname='mappaDescrizione1'> <br/> <div data-blockname='mappaDescrizione2' style='margin:2px;border: 1px solid red'> <div><h3>Test Moto</h3></div> <div data-gjs-type="map" style='height:200px;width:400px'></div> <div>Test Zaltbommel<br> Schimminck 4<br> 5322 Daltbommel <br> Netherlands </div> </div> <br/> </div>, });

I want to make <div><h3>Test Moto</h3></div> not droppable, how it’s done? With a class ? Like <div class='notDropppable'><h3>Test Moto</h3></div> ?

thanks, Walter

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RJCAMcommented, Aug 26, 2020

So, I’m not sure if this are the best answers but they work for me.

How to tell elements inside h4 are data-gjs-editable=“false” also?

With this attribute: contentEditable=“false”

if I delete all chars in a box then the box disappear, is there a way to not delete the box and keep a min-width?

I’m doing this but the box still remains when removed all chars, try some attributes when creating it like contentEditable

Why a single text…

I’m not able to reproduce this behavior, the text is added as a unique string, perhaps can be the way your declaring it

0reactions
artfcommented, Sep 1, 2020

You should use it on the Component properties, not the Block one

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unwanted margin in inline-block list items - html - Stack Overflow
Looking at firebug, the list items do not have any margin at all, but there seems to be a void space between them....
Read more >
Fighting the Space Between Inline Block Elements | CSS-Tricks
A series of inline-block elements with "normal" HTML formatting result in spaces between them when set on the same line.
Read more >
Layout and the containing block - CSS: Cascading Style Sheets
Most often, the containing block is the content area of an element's nearest block-level ancestor, but this is not always the case. In...
Read more >
Prevent editing some components · Issue #422 · artf/grapesjs
I would like to prevent users from editing the internal components of specific components. IE lets say I have an element called Drupal-Block...
Read more >
Adding content with Blocks - Squarespace Help Center
Version 7.1 - Click Edit in the top-left corner of the page where you want to add the block and ensure the page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found