Added debug and engine.textToHtml()