Skip to content

Editable Templates

You can take advantage of the dynamic editor to generate compatible HTML templates, in this way you can allow you to drag blocks or edit content directly, for this there are HTML attributes that are interpreted by the dynamic editor natively.

Special HTML attributes

te-draggablecontainer

Parent container of elements that can be repositioned and where new structures can be dragged

Apply to:

  • tbody

Example:

<table>
    <tbody te-draggablecontainer="">
        <tr te-draggable="">
            <td>[...]</td>
        </tr>
        <tr te-draggable="">
            <td>[...]</td>
        </tr>
    </tbody>
</table>

te-draggable

Block that can be repositioned

Apply to::

  • div
  • tr

Example:

<table>
    <tbody te-draggablecontainer="">
        <tr te-draggable="">
            <td>[...]</td>
        </tr>
        <tr te-draggable="">
            <td>[...]</td>
        </tr>
    </tbody>
</table>

te-repeatable

Block that can be duplicated or repeated from the editor

Apply to::

  • div
  • tr
  • td
  • table

Example:

1
2
3
4
5
6
7
<table>
    <tbody >
        <tr te-repeatable="">
            <td>This block is repeated</td>
        </tr>
    </tbody>
</table>

te-edit

Element that can be edited, it can be a block for text or an image

Apply to::

  • div
  • td
  • span
  • img

Example:

<table>
    <tbody >
        <tr>
            <td>
                <img src="" te-edit="">
            </td>
            <td te-edit="">
                Default text
            </td>
        </tr>
    </tbody>
</table>