Using PHP I\'m attempting to take an HTML string passed from a WYSIWYG editor and replace the children of an element inside of a preloaded HTML document with the new HTML.>
You can use loadHTML() on a fragment of code and then append the resulting created nodes into the original DOM tree.
loadHTML()