GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.05k forks source link

[QUESTION] Component HTML being changed #2924

Closed tomazkramberger closed 4 years ago

tomazkramberger commented 4 years ago

I am using GrapesJs to define Freemarker FTL templates. I am seeking an issue when my custom component HTML has been changed after inserted into canvas or imported through Import template component using newsletter plugin.

So my original HTML content looks like:

<table>
    [#list items as item]
        <tr>
            <td>
                <div class="m-stack m-stack--ver m-stack--general">
                    Some content ${item.id}
                </div>
            </td>
        </tr>
    [/#list]
</table>

into

[#list items as item][/#list]
<table>
    <tr>
        <td>
            <div class="m-stack m-stack--ver m-stack--general">
                Some content ${item.id}
            </div>
        </td>
    </tr>
</table>

which corrupts my template.

Is there a way to bypass HTML formatting or whatever is going behind to cause this?

ShenolHusein commented 3 years ago

@tomazkramberger did you find a solution to this problem?

tomazkramberger commented 3 years ago

@tomazkramberger did you find a solution to this problem?

@ShenolHusein Yes, i did. Here is the link to solution https://stackoverflow.com/questions/63475404/html-editor-removes-freemarker-tags-inside-table-tag