денис77447327,
а ты подойди с другой стороны
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.long-edit-span {
border: 1px solid gray;
padding: 2px;
}
.commonstring {
display: none;
}
</style>
</head>
<body>
<span class="long-edit-span" contenteditable>
<input class="commonstring edit long-edit" data-mergefields="Number" id="commonStringgsTransportRemovable" name="commonStringgsTransportRemovable" type="text" value="">
какой-то текст
</span>
<script>
(function () {
document.querySelector('.long-edit-span').addEventListener('keyup', function(e) {
document.getElementById('commonStringgsTransportRemovable').value = e.target.textContent.trim();
});
})();
</script>
</body>
</html>