Skip to content

Instantly share code, notes, and snippets.

@strathmeyer
Created April 20, 2012 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strathmeyer/2429911 to your computer and use it in GitHub Desktop.
Save strathmeyer/2429911 to your computer and use it in GitHub Desktop.
{
"submitURL": "https://api.powerinbox.com/embed/video",
"slug": "youtube",
"defaultPostData": {
"type": "youtube"
},
"requiredFields": [
{
"type": "RegExpTextField",
"options": {
"id": "url",
"prettyName": "YouTube URL",
"placeholder": "http://youtube.com/watch?v=123ABC",
"helpText": "Copy a YouTube video URL and paste it in here",
"regexp": "^https?://(www\\.)?(youtu\\.be/|youtube\\.com/watch\\?v=).+",
"regexpError": "Please enter a YouTube URL like http://youtube.com/watch?v=123ABC or http://youtu.be/123ABC"
}
}
],
"optionalFields": [
{
"type": "PixelField",
"options": {
"id": "height",
"prettyName": "Height",
"helpText": "The height of your embedded video",
"min": 0,
"max": 1080
}
},
{
"type": "PixelField",
"options": {
"id": "width",
"prettyName": "Width",
"helpText": "The width of your embedded video",
"min": 0,
"max": 1920
}
},
{
"type": "TextField",
"options": {
"id": "defaultHtml",
"prettyName": "HTML for static emails",
"helpText": "You can use this field to specify custom HTML that will show up if the recipient doesn't have PowerInbox installed"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment