Linked Questions

Popular Questions

Get contenteditable value by PHP POST

Asked by At

I create own WYSIWYG and I want to get his content (its div)

I try to do this:

$dom = new DOMDocument();

$dom->loadHTML($html);

$xpath = new DOMXPath($dom);
$divContent = $xpath->query('//div[id="editor"]');
$_POST['details'] = $divContent;

<div id="editor" style='height:500px;' name="details" contenteditable required>
    <p></p>
</div>

I want to get the div that have the id editor content, but its return nothing.

Related Questions