embed youtube in actiontext?
Chris, I see you already referred to the problem of embedding Youtube videos in actiontext
https://github.com/excid3/cfps/blob/3bed21b7aa319ce8e0a98283965ab64df2597488/2020-railsconf.md
Did you manage to solve the problem?
Hi ya na,
He did a whole talk about this.
https://railsconf.com/2020/video/chris-oliver-advanced-actiontext-attaching-any-model-in-rich-text
You can embed iframes into ActionText but you have to whitelist the iframe element.
##application.rb
config.to_prepare do
ActionText::ContentHelper.allowed_tags << "iframe"
end
for some reason it does not work for me :(
https://github.com/excid3/railsconf-2020-actiontext/commit/c149d0fcac01745b11bfe0d7a9b8f860db5a16da#diff-ff41d75d361b4129e23637af44d9d666
another approach:
https://github.com/Vizzuality/laws_and_pathways/pull/245/files