Skip to content

Commit

Permalink
add class to statically rendered field
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Oct 20, 2023
1 parent 1b15638 commit 0461d38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,11 @@ protected function inputHtml(mixed $value, ElementInterface $element = null): st
*/
public function getStaticHtml(mixed $value, ElementInterface $element): string
{
return Html::tag('div', $this->prepValueForInput($value, $element) ?: ' ');
return Html::tag(
'div',
$this->prepValueForInput($value, $element) ?: ' ',
['class' => 'noteditable']
);
}

/**
Expand Down

0 comments on commit 0461d38

Please sign in to comment.