D
D
Daniyar2021-12-04 19:42:06
JavaScript
Daniyar, 2021-12-04 19:42:06

How to disable table formatting in tinymce?

Good afternoon, tell me how to disable the formatting of the html code of the table
. I'm trying to loop lines, but the editor distorts my source code.

It should be like this

<table class="table" width="100%">
<tr>
<td>#</td>
<td>Бюджет</td>
<td>Доход</td>
</tr>
{foreach menu_id="1"}
<tr>
<td>{id}</td>
<td>{%budget%}</td>
<td>{%dohod%}</td>
</tr>
{/foreach}
</table>


Converted to this
<p>{foreach menu_id="1"}{/foreach}</p>
<table class="table" border="1" width="100%">
<tbody>
<tr>
<td>#</td>
<td>Бюджет</td>
<td>Доход</td>
</tr>
<tr>
<td>{id}</td>
<td>{%budget%}</td>
<td>{%dohod%}</td>
</tr>
</tbody>
</table>


javascript settings
tinymce.init({
        selector:'.wysiwyg',
        language: "ru",
        plugins: ["code", "link", "table", "pagebreak", "lists", "visualchars", "print"],
        relative_urls: false,
        convert_urls: false,
        remove_script_host : false,
        paste_data_images: true,
        verify_html : false,
    });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question