I'm displaying you-tube video on front end of the website. Admin can provide the you-tube source from embedded code from Site back end. I want to have a preview on view page. Following is the code I tried but it is displaying the iframe tags as it is (I know this is not the right way)
[
'attribute'=>'source',
'value' => !empty($model->source) ? '<iframe class="embed-responsive-item" src="'.$model->source.'" frameborder="0" allowfullscreen></iframe>' : NULL,
],
is there any thing like it has for image format:
[
'label'=>'Image',
'attribute'=>'userInfo.image',
'format' => ['image',['width'=>'100','height'=>'100']],
],