Skip to content

Commit

Permalink
Merge pull request #359 from aksm/ISSUE-358
Browse files Browse the repository at this point in the history
ISSUE-358: Metadata Display Preview Codemirror output visually inconsistent
  • Loading branch information
DiegoPino authored Sep 18, 2023
2 parents 663b0fa + e993a9e commit 608df94
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/Form/MetadataDisplayForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,14 +451,19 @@ public static function ajaxPreview($form, FormStateInterface $form_state) {
}
if (isset($render) && (!$show_render_native || ($show_render_native && $mimetype != 'text/html'))) {
$output['preview'] = [
'#type' => 'codemirror',
'#rows' => 60,
'#value' => $render,
'#codemirror' => [
'lineNumbers' => FALSE,
'toolbar' => FALSE,
'readOnly' => TRUE,
'mode' => $mimetype,
'#type' => 'details',
'#open' => TRUE,
'#title' => 'Processed Output',
'render' => [
'#type' => 'codemirror',
'#rows' => 60,
'#value' => $render,
'#codemirror' => [
'lineNumbers' => FALSE,
'toolbar' => FALSE,
'readOnly' => TRUE,
'mode' => $mimetype,
]
],
];
}
Expand Down

0 comments on commit 608df94

Please sign in to comment.