[QUESTION][REQUEST] How to remove a block?
Question
editor.DomComponents.getWrapper().getEl().insertAdjacentHTML('beforeBegin', letBlock)
letBlock letblock is a variable that contains HTML.
Question:
- How to remove this adjacent HTML?
- is there a function like "insertAdjacentCSS()"?
Answers (3)
You touched on a few questions here, but to get to your first in your headline; reference the BlockManager api docs here
e.g. BlockManager.remove('custom-block-id')
You're mixing too much stuff in one question and without any context
@artf I just wanted to remove the new block that I added via
editor.DomComponents.getWrapper().getEl().insertAdjacentHTML();
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1895
[QUESTION] Drag component over canvas with script, script appended multiple times.
Hi, not sure if this is a bug or not. But I noticed a weird behavior, when I drag a block that has a component that contains a script funct...
Issue #3878
BUG: Not able to rename the page name and page id if we are using multipage concept
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v9Reproducible demo link Not thereDes...
Issue #1670
Adding default Layout in grapejs
When I open the grapejs editor for the first time it appears as white-board. I need to add default HTML layout (columns) like in this photo...
Issue #1628
custom tool deleting issue
After deleting custom tool ( from html editor ) that contain html with Js code , the code still in the grapes editor , how i can remove it ?
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.