Spin-active optical emitters in two-dimensional materials