Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandoncorbin/url2html
Converts urls for images, videos (youtube, vimeo), mp3s into html...
https://github.com/brandoncorbin/url2html
Last synced: 2 months ago
JSON representation
Converts urls for images, videos (youtube, vimeo), mp3s into html...
- Host: GitHub
- URL: https://github.com/brandoncorbin/url2html
- Owner: brandoncorbin
- Created: 2013-07-12T01:25:19.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-18T02:22:02.000Z (over 6 years ago)
- Last Synced: 2024-10-11T06:35:07.224Z (3 months ago)
- Language: JavaScript
- Homepage: https://brandoncorbin.github.io/url2html
- Size: 109 KB
- Stars: 5
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
url2html
========Converts a url in to html. Simple.
**Supports**
- Youtube
- Vimeo
- Mp3s (using strangecube.com's embed player)
- Defaults to a simple
``````
let embedCode = url2html('http://www.youtube.com/watch?v=SKm6JIN0078').get();
```## url2html().parse(text)
Returns a a string of html with links converted to html versions.
text = "Free Your Mind. http://www.youtube.com/watch?v=SKm6JIN0078 \n\n ";
text=text+"Meet Momo. https://en.wikipedia.org/wiki/Momo_the_Monster http://www.stateofhorror.com/momo2.jpg";content = url2html().parse(text);
document.write(content);## url2html.get(link)
Returns html version
document.write(url2html('http://www.youtube.com/watch?v=SKm6JIN0078').get());
### Sample
Free Your Mind. http://www.youtube.com/watch?v=SKm6JIN0078 \n\n Meet Momo. https://en.wikipedia.org/wiki/Momo_the_Monster http://www.stateofhorror.com/momo2.jpg
![url2html screen](http://i.imgur.com/Jiya6LE.png)