Giter VIP home page Giter VIP logo

url2html's Introduction

url2html

Converts a url in to html. Simple.

Supports

  • Youtube
  • Vimeo
  • Mp3s (using strangecube.com's embed player)
  • Defaults to a simple <a href...

Why? I fell in love with Basecamp's automatic conversion of image and video links but couldn't find an existing library.

##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.get('http://www.youtube.com/watch?v=SKm6JIN0078'));

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

url2html's People

Contributors

brandoncorbin avatar

Stargazers

Ransom Carrolll avatar

Watchers

 avatar James Cloos avatar Ransom Carrolll avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.