Use (undocumented) EditorView APIs to pull lines.

Hey, it's still better than grabbing them from the DOM myself, right?