Embedding Shiny into a Wordpress blog post using iframe

544 views
Skip to first unread message

Thiago Milagres

unread,
Aug 5, 2017, 4:49:19 PM8/5/17
to Shiny - Web Framework for R
So, I'd like to learn how to embed a Shiny app into a blog post. Since I know nothing about HTML and iframe, I'm following this good post:


However, I'm having the following problem. When I paste the following into the "HTML" tab of the Wordpress:


<iframe style="border: none; width: 900px; height: 500px;" src="https://stla.shinyapps.io/3Dsliced/" width="900" height="500"></iframe>

It does seem to work when I switch to the Visual tab:




However, when I do post, only the link for the app appears:











This is probably a very basic question, but what could I be doing wrong?

Thank you

Erik Westlund

unread,
Aug 5, 2017, 5:07:03 PM8/5/17
to Thiago Milagres, Shiny - Web Framework for R
Wordpress is probably stripped the iframe tag when sanitizing your post.

Can you right click the vinal page, hit view source, and paste results?  Do a find for iframe and see if it even shows up.


Iframes with shiny and WP are not impossible but can sometimes require things like CSRF tinkering, etc.

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/627dfb2a-6894-4eb8-86a5-03b680f218e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thiago Milagres

unread,
Aug 5, 2017, 5:18:23 PM8/5/17
to Shiny - Web Framework for R, thiagogp...@gmail.com
Thanks for the reply. You do seem to be correct, because when I see the page source, under content, it shows:

So indeed no iframe. Do you know of any link explaining what I could do to solve this problem?


On Saturday, August 5, 2017 at 6:07:03 PM UTC-3, Erik Westlund wrote:
Wordpress is probably stripped the iframe tag when sanitizing your post.

Can you right click the vinal page, hit view source, and paste results?  Do a find for iframe and see if it even shows up.


Iframes with shiny and WP are not impossible but can sometimes require things like CSRF tinkering, etc.
On Sat, Aug 5, 2017 at 3:49 PM, Thiago Milagres <thiagogp...@gmail.com> wrote:
So, I'd like to learn how to embed a Shiny app into a blog post. Since I know nothing about HTML and iframe, I'm following this good post:


However, I'm having the following problem. When I paste the following into the "HTML" tab of the Wordpress:


<iframe style="border: none; width: 900px; height: 500px;" src="https://stla.shinyapps.io/3Dsliced/" width="900" height="500"></iframe>

It does seem to work when I switch to the Visual tab:




However, when I do post, only the link for the app appears:











This is probably a very basic question, but what could I be doing wrong?

Thank you

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.

Erik Westlund

unread,
Aug 5, 2017, 5:23:47 PM8/5/17
to Thiago Milagres, Shiny - Web Framework for R
You might try something like this as a first shot:


To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/8868bc24-4a9d-4cde-8069-b8481441cf54%40googlegroups.com.

3D0G

unread,
Aug 6, 2017, 3:14:07 PM8/6/17
to Shiny - Web Framework for R
Reply all
Reply to author
Forward
0 new messages