Feature: toHtml function

I've tested the new feature and it works