Issue #2166Opened July 24, 2019by froderf2 reactions

[QUESTION][REQUEST] How to remove a block?

Question

editor.DomComponents.getWrapper().getEl().insertAdjacentHTML('beforeBegin', letBlock)

letBlock letblock is a variable that contains HTML.

Question:

  1. How to remove this adjacent HTML?
  2. is there a function like "insertAdjacentCSS()"?

Answers (3)

zgoverJuly 24, 20192 reactions

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')

artfJuly 25, 20190 reactions

You're mixing too much stuff in one question and without any context

froderfJuly 26, 20190 reactions

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

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.