xdan / jodit

Jodit - Best WYSIWYG Editor for You
https://xdsoft.net/jodit/
MIT License
1.61k stars 341 forks source link

Add Handlebars support #1087

Open RitaRoca opened 4 months ago

RitaRoca commented 4 months ago

I want to use JODIT as a template maker with handlebars support. However, I have a problem when adding them depending on where I do it.

For example, if I try to create a table in which I paint a row for each element, it detects it as a bad syntax and changes it.

If I use the editor in source mode and enter this:

<table>
    <tbody>
        {{#each data}}
        <tr>
            <td>{{ this }}</td>
        </tr>
        {{/each}}
    </tbody>
</table>

It is automatically parsed as:

<p>
    {{#each data}}
    {{/each}}
</p>
<table>
    <tbody>
        <tr>
            <td>{{ this }}</td>
        </tr>
    </tbody>
</table>

As you can see it detects that the loop syntax is wrong and takes it out of the table element. I have tried deactivating the plugins clean-html, dtd and even modifying the options and still the same.

I think there should be a way where you don't get the HTML corrected directly if you disable it (assuming the danger involved) or just add support for handlebars syntax.

Jodit Version: 3.24.9

Browser: All OS: All Is React App: False

rafaneri commented 1 month ago

@RitaRoca, I'm facing the same problem. Could you let me know if you solved this issue?