I think tooltip with one long line is a little bit harder to read than a wrapped one, but we don't have very long lines so `white-space: pre` might be indded better.
> shift tooltip position (when needed) to the left 

this is good. Also it will be better to add the tooltip to the document body instead of editor container. in case one of editor parents have overflow auto.