Remove the line break that is added when the return key is pressed.
Check the current target directly.
Use textContent for inline editing instead of innerHTML, which will hoist up some HTML content implicitly created around user input for a contenteditable span.
Note that there is a removeAllRanges in addition to a blur here; see
https://stackoverflow.com/questions/4878713/how-can-i-blur-a-div-where-contenteditable-true
Fix broken tests.
Fixes#1757
Made the contenteditable attribute conditional based on whether the object can be edited or not. If the object is not editable, the attribute is removed.
Add Tests.
Fixes#1746