How to disable DOCType, HTML, HEAD & BODY tag
th3-sh0w3r opened this issue · 2 comments
th3-sh0w3r commented
Hey,
how do I disable the (DOCType, HTML, HEAD & BODY tags)?
I just want that my Input is the same as my output.
Now:
Input: <div><p>Test</p></div>
Output: <DOCTYPE><html><head></head><body><div><p>Test</p></div></body></html>
What I want:
Input: <div><p>Test</p></div>
Output: <div><p>Test</p></div>
drtheuns commented
Seems to work fine for me:
$html5 = new HTML5();
$dom = $html5->loadHTMLFragment('<div><p>Test</p></div>');
$html5->saveHTML($dom); // renders: <div><p>Test</p></div>