tinymce-rails
tinymce-rails copied to clipboard
Is there anyway to apply toolbar event apply only to the root node of the selection
Hi, I am using tinymce-rails (4.6.7).
I was wondering if the tinymce toolbar to only act on the root node of the selected element (highlighted by cursor).
Original selected elements:
<div>
<table>
<tbody>
<tr>
<td>
<div>some text here</div>
</td>
</tr>
</tbody>
</table>
</div>
Tinymce by default when used "bold" button on the toolbar:
<div>
<table>
<tbody>
<tr>
<td>
<strong>
<div>some text here</div>
</strong>
</td>
</tr>
</tbody>
</table>
</div>
Instead, I want it to be like below where the style is applied to the top element:
<div font-weight="bold">
<table>
<tbody>
<tr>
<td>
<div>some text here</div>
</td>
</tr>
</tbody>
</table>
</div>
Please let me know if anyone knows a solution to this.