How to break output of GridView in a new line

Hi guys,follwong code will read out content of email being in table. Content of mail is about several lines,of course, so my intention ist to break line(<br> ‘\n’) after a point in mail(see my attachement) Do I have to use highly diverse string functions of php or can I achieve my intention with framework?

Any ideas, how to get my intention with yii2?

I Try like this, but this is not,as it should be





                      [

                'attribute' => 'bodytext',

                'label' => Yii::t('app', 'Mailinhalt'),

                'contentOptions' => [

                    'style' => ['max-width' => '200px;']],

                'value' => function($model) {

                    if ($model->bodytext) {

                        return $model->bodytext;

                    } else {

                        return NULL;

                    }

                },

            ],

StringHelper::truncateWords()

Another solution could be like this:





    [


        'attribute' => $dummy,

        'label' => Yii::t('app', 'arbeitslos seit'),

        'format' => 'html',

        'contentOptions' => [

            'style' => ['width' => '150px;']

        ],

.

.



in




GridView::widget([

.

.


 	'options' => [

            'style' => 'overflow: auto; word-wrap: break-word;'

        ],

];



I just have found it here here