This could be a good reference
But for editing view, currently you either live with wrapped code or unwrapped code that would scroll entire note.