Home > front end >  How to render IFRAME tags if it is in text editor?
How to render IFRAME tags if it is in text editor?

Time:09-13

I am using a tinymce text editor for writing a paragraph. If i include youtube video in IFRAME tags inside a text editor then it doesn't render it in the frontend. Just a plain text of iframe is displayed.

Code

{!! $item->display_paragraph !!}

output

iframe picture

So how do i render iframe along with text using text editor.

CodePudding user response:

Use the TinyMCE Page Embed plugin: https://www.tiny.cloud/docs/plugins/premium/pageembed/#usingpageembed

CodePudding user response:

I solved this by using mutator.

 public function setDescriptionAttribute($value) 
    {
        $this->attributes['description'] = htmlspecialchars_decode($value);
    }
  • Related