4

For some reason, TinyMCE is allowing an invalid attribute from Google Sheets.

Here is an example:

<tr style="height: 21px;">
    <td data-sheets-hyperlink="link" data-sheets-formula="link">Foo</td>
    <td data-sheets-hyperlink="link" data-sheets-formula="link">Bar</td>
    <td data-sheets-hyperlink="link" data-sheets-formula="link">Foo</td>
    <td data-sheets-hyperlink="link" data-sheets-formula="link">Bar</td>
    <td data-sheets-hyperlink="link" data-sheets-formula="link">Foo</td>
</tr>

I already tried to set data-sheets-hyperlink and data-sheets-formula as invalid attributes using valid_elements and invalid_elements, but TinyMCE still allows it.

Any idea on how to remove these attributes as they are not useful and can be an issue for big tables?

Thanks.

Bruno Monteiro
  • 712
  • 6
  • 22

1 Answers1

0

It seems that TinyMCE is not removing data-* attributes

Try this fiddle with [TinyMCE][1] configured to parse as full XHTML and fill it's source code with:

<a dir="" style="color: red;" href="https://google.com" data-v-test="">TEST</a>
<ul>
<li tabindex="2" dir>List element</li>
</ul>

Output is

<p><a href="https://google.com" style="color: red;" data-v-test="">TEST</a></p>
<ul>
<li>List element</li>
</ul>

Check this [answer][2].

Adam Mańkowski
  • 767
  • 11
  • 21