custom code - 1. div...

Hi

When I enter a custom code in the html view appears

html-view:<div>custom code</div>

custom code-view:<div>custom code</div>

I edit the custom code and add <_p></_p> so there is custom code-view:

<div>custom code</div>
<_p></_p>

but the html-view shows:

<div>
   <div>custom code</div>
   <_p></_p>
</div>

when I delete the p-Tag the DIV disapears. when I make some DIVs, each with a class, there is suddenly an DIV with no class in, an the design got crasy.

I think I can answer this while we wait for an official answer:

<_p> is NOT a form of valid HTML, I bet Bootstrap Studio get's confused.

I tried putting your code in my project, everything seems to be working totally fine. What is it you're trying to do? <_p> is a very weird HTML element...

I'd have to agree with @solace.

The BSS app's HTML widget seems to always display the Custom Codes container DIV. I'm sure it's just a place holder, it doesn't appear to be anything other then that. As it does not show up when I preview the page.

I don't think that any HTML (not considering XML here) tag that starts with an underscore to be consider valid. BSS app appears to convert the opening tag to text and the closing tag to a comment, based on what I see when inspecting the page from a preview.

For me the HTML widget only displays valid tags etc...

Saj

Frank has written the <p> as <_p> as our forum doesn't correctly escape HTML. We will look into this as soon as possible but right now we want to concentrate on the next Bootstrap Studio release.

The issue that you've observed is caused due to the way Custom Code is implemented. All components must export only a single top level dom element, so to make it work in Bootstrap Studio we wrap multiple tags in a div. In the Preview and when exporting, there is no such limitation so we just include the contents of Custom Code exactly as you've written it.

In the next releases we will investigate if it would be possible to do it without wrapping your elements in a div.