Yii Framework Forum: Show plain text in Gridview/DetailView - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Show plain text in Gridview/DetailView [solved] Rate Topic: -----

#1 User is offline   tklustig 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 219
  • Joined: 20-April 17
  • Location:Hannover

Posted 08 September 2017 - 10:14 AM

Hi guys,
I use kartik/GridView. In my database, I have following record using widget of \dosamigos\ckeditor\CKEditor:
<p>ist gewöhnungsbedürftig aber halt auch kompetent</p>

Any ideas how to outline this record in GridView without HTMl-tags , just plain text like this:
ist gewöhnungsbedürftig aber halt auch kompetent

Here is my DetailView:
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
?>
<div class="bewerber-view">

    <div class="row">
        <div class="col-sm-9">
            <h2><?= Html::encode($model->id) ?></h2>
        </div>
    </div>

    <div class="col-lg-1">
        <?php
        $gridColumn = [
            .
            .
  'beurteilung_persoenlich:ntext', //contains upper record
            .
            .
        ];

        echo DetailView::widget([
            'model' => $model,
            'attributes' => $gridColumn
        ]);
        ?>
 
</div>

0

#2 User is offline   tklustig 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 219
  • Joined: 20-April 17
  • Location:Hannover

Posted 08 September 2017 - 10:38 AM

Got solution for my own.Here,it is
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
?>
<div class="bewerber-view">

    <div class="row">
        <div class="col-sm-9">
            <h2><?= Html::encode($model->id) ?></h2>
        </div>
    </div>

    <div class="col-lg-1">
        <?php
        $gridColumn = [
            .
            .
  'beurteilung_persoenlich:html', //contains upper record
            .
            .
        ];

        echo DetailView::widget([
            'model' => $model,
            'attributes' => $gridColumn
        ]);
        ?>
 
</div>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users