<div class = "container" contenteditable>Edit me</div>
<div class = "withP"></div>
<script src = "100.js"></script>
document.getElementsByClassName('container')[0].oninput = function ()
{
document.getElementsByClassName('withP')[0].innerHTML = '<p>' + document.getElementsByClassName('container')[0].innerHTML + '</p>';
}