Add support for giving the html instead of url
Major refacotr and API change to allow only one param