You are here

public function WebformCodeMirror::preview in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformCodeMirror.php \Drupal\webform\Plugin\WebformElement\WebformCodeMirror::preview()

Generate a renderable preview of the element.

Return value

array A renderable preview of the element.

Overrides WebformElementBase::preview

File

src/Plugin/WebformElement/WebformCodeMirror.php, line 94

Class

WebformCodeMirror
Provides a 'webform_codemirror' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function preview() {
  return parent::preview() + [
    '#mode' => 'yaml',
  ];
}