Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hello, is it possible to embed <iframe> tag in richtext? We need embed youtube iframes into the blog text. We usuing richtext region in our blog.
Hi,
You may use 'shortcodes' - https://docs.couchcms.com/miscellaneous/shortcodes.html
The second item on the same page under "Ready to use examples of shortcodes" gives the code.

Hope this helps.
Thanks! But still i can only insert shortcode after blog text not beetween for example.
Can we disable deleting <iframe> tag in richtext?

Is it possible to add this shortcode using options panel in richtext? Like adding image. For my client it will be great. For example add iframe shortcode menu option?

For now my client add iframe by "anchor" option, with example anchor name:

<iframe width="560" height="315" src="https://www.youtube.com/embed/mqoMVDbEeH8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Result:
In attachment.

1. With text "name"...
2. When i refresh post in admin panel this iframe will gone. Only text will visible after refresh page.

Attachments

The All Purpose Embed Shortcode works well for this use case, and it's pretty easy for the client to use and understand.

In the richtext editor they would write:

This is my text of which I am proud.
[embed code='<iframe width="560" height="315" src="https://www.youtube.com/embed/mqoMVDbEeH8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>']
And here is some more text after the video.
Hi

Awesome! I finished this task.

Thanks you a lot for answers.
5 posts Page 1 of 1