I need a WYSIWYG HTML editor that can edit PHP Blade and Handlebars* templates. I've tried TinyMCE, CKEditor and bootstrap wysihtml5 but they all "fix" my invalid HTML. Can anyone suggest an alternative?
I need to be able to toggle between WYSIWYG and Source mode without the following being altered.
<table>
<thead>
<tr>
<tr>Column 1</tr>
<tr>Column 2</tr>
</tr>
</thead>
<tbody>
@foreach ($data as $datum)
<tr>
<td>{{ $datum->col1 }}</td>
<td>{{ $datum->col2 }}</td>
</tr>
@endforeach
</tbody>
</table>
All the editors I have found remove the @foreach
and sometimes break the table too. I don't care too much if the "visual" mode is broken but I need the HTML to remain untouched.
*I prefix Handlebars variables with $ so they're broadly compatible with blade templates.