preview in editor renders selections, moved selection rendering code to new package