Inline images and videos in forum posts
6yr
@pinkapricorn
Since this is a pretty standard feature on forums, it might already be on your list of things to code, but if not then I present this argument in favor of it :)
Alright, so, it's all well and good that we can include images at the end of our posts but this isn't ideal for when we have commentary to go with each image. Like let's say I'm posting several Drawabox exercises and I'm giving an overview of the objective for each one. Well, as the forum is now, I have to put all these explanations together in one place and the user has to jump back and forth between that wall of text and the images to see what I'm talking about meanwhile probably losing their place in the text and having to find it again.
It's much better if I can include my images inline in my posts (intermixed with my words) so I can write commentary for one, include the image below, write it for another, and include the image below, and so on.
Also sometimes I want to link to a video in my posts and I think it makes for a more coherent user experience if the user can watch the video directly from within in the post rather than having to leave Proko to go to YouTube and then possibly getting distracted on something they see there. Youtube is designed to be distracting and it's one more thing getting in between people and improving their art.
I don't think this would be very hard to do. You'd just need to write a script that parses the user's posts for indication of a Youtube link (e.g. pattern matching for http://www.youtube.com or http://youtube.com ) and then it grabs the link and puts it within some HTML like so:
<iframe width="560" height="315" src="LINKGOESHERE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Example:
<iframe width="560" height="315" src="https://www.youtube.com/watch?v=EcOE1ScBozI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
And of course, this is just displaying my HTML as plain text because it would be a security vulnerability if you allowed the users to write their own HTML willy-nilly but on the finalized site it would display the Youtube player with the video in it.