Using only contenteditable:
<style>
[contenteditable] {
white-space: nowrap;
width:200px;
overflow: hidden;
}
[contenteditable] br {
display:none;
}
[contenteditable] * {
display:inline;
white-space:nowrap;
}
</style>
Using contenteditable="true" and a class named "single-line"
[contenteditable="true"].single-line {
white-space: nowrap;
width:200px;
overflow: hidden;
}
[contenteditable="true"].single-line br {
display:none;
}
[contenteditable="true"].single-line * {
display:inline;
white-space:nowrap;
}