Khanh Hoang - Kenn
Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.
Many websites want to allow users to submit videos, audio files, documents and the like.
However, if those files are stored on other sites, it can be difficult to display that content consistently. For example, if you allow people to submit YouTube videos, there are multiple different types of embed code.
One of our members wanted to allow users to submit Google docs that would automatically be shown inside iframes.
The solution to all these problems is the "Custom Formatters" module. Here's how to use Custom Formatters:
We have a content type called Documents. There's a Text field called: Google Doc ID:
We also have a Google doc. The ID of the Google doc is in the URL:
Let's apply the custom formatter to our field:
This technique should work for many other sites such as YouTube, Vimeo or Flickr. You can control the embed and just ask users to enter the unique ID.