Issue #1939Opened April 2, 2019by minuwan0 reactions

Table and Div with Grapesjs

Question

I need to place a "Div with some texts" inside a table's "tbody". I managed to trag and drop it. But when I saved it and load it again the div goes back to before the table tag. I belive this is happens in the blocks/compents coded to not allow any other elemenet to go inside. Is there any way to overcome this ?

PS: I'm using that Div to generate a loop in the final generated html code.

// Before saved
<table>
    <thead>
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
        </tr>
    </thead>
    <tbody>
        <div>loop_start</div> <-------- THESE (Orignal position)
        <tr>
            <td>Column 1</td>
            <td>Column 2</td>
        </tr>
        <div>loop_end</div> <-------- THESE (Orignal position)
    </tbody>
</table>
// After saved
<div>loop_start</div> <-------- MOVED TO HERE
<div>loop_end</div>   <-------- MOVED TO HERE
<table>
    <thead>
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Column 1</td>
            <td>Column 2</td>
        </tr>
    </tbody>
</table>

Answers (2)

artfApril 3, 20190 reactions

I need to place a "Div with some texts" inside a table's "tbody".

You can't because it's against HTML5. Inside tbody you can only place tr

lock[bot]April 2, 20200 reactions

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.

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.