{# /** * @file * Theme implementation for 'CodeMirror' code. * * Available variables * - code: The code. * - type: The type of code. * - mode: The CodeMirror mode used to format the code. * * @see http://codemirror.net/doc/manual.html#option_mode * @see \Drupal\yamlform\Element\YamlFormCodeMirror() * @see template_preprocess_yamlform_codemirror() * * @ingroup themeable */ #} {% if type == 'html' %} {{ attach_library('yamlform/codemirror.html') }} {% elseif type == 'yaml' %} {{ attach_library('yamlform/codemirror.yaml') }} {% else %} {{ attach_library('yamlform/codemirror.text') }} {% endif %}
{{ code }}