No Wrapper
Question
Is it possible to add elements to the canvas that don't have the automatic wrapper added?
There is always a parent div added to the "content" is there anyway to have only the content added to the canvas without the wrapper?
editor.BlockManager.add('test',
{
category:'Containers',
label: 'Full Width',
content: '<div>abc</div>',
});
When this gets dragged to the canvas, it will become
<div class="generated_class">
<div>abc</div>
</div>
Is there anyway to keep it just
<div>abc</div>
Thanks
Answers (2)
@michaellwatson blocks shouldn't be wrapped (just tested it in the demo), indeed if you drop an image block you just get an img
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.
Issue #792
Script property using function don't work with blocks
In Components & JS docs there's this example: This works perfectly. But I couldn't use a function instead of a string in script, as is said...
Issue #1499
[Question] Is it possible to perform dom manipulation through the block's contents script?
Hey! First of all thank you so much to build such a great and versatile tool. Is it possible that I can manipulate the dom elements of the...
Issue #1034
insert element or block inside parent element
Good day, i have component, have block i have Trait on listen changes, how can I add "h1 " inside that block "'<div class="container" style...
Issue #1584
Not getting the Script of Block from editor.getComponents()
Below is the Component that I'm adding. this.editor.BlockManager.add('dob-mmyy-pii', { id: 'dob-mmyy', label: DOB (MM, YYYY) (PII), categor...
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.