postyou/headline-tiny-mce

HTML headline for Contao

3.1.1 2022-10-18 12:08 UTC

This package is auto-updated.

Last update: 2024-04-21 10:56:20 UTC


README

This Contao CMS extension adds a small TinyMCE editor to all DCA headline fields and allows HTML tags for them.

Template

The be_tinyHeadlineMCE.html5 template is used by default. It disables the paragraph root block and limits the valid elements. Only phrasing content should be allowed inside of HTML headings.

<script>
  window.tinymce && tinymce.init({
    ...

    // limit height
    height: 110,

    // disable menubar
    menubar: false,

    // disable default <p></p> root blocks
    forced_root_block: false,

    // limit toolbar according to valid_elements
    toolbar: 'link unlink | bold italic | code',
    valid_elements: 'a[href|target|title],strong/b,em/i,br'
  });
</script>