Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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...

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)