The German ministry for research and education sponsors a lot of open-source projects they think will be useful for the open-source-landscape or their own projects some day.
specifically, Codemirror got funding [0] via the Prototype Fund [1], which is a partnership beteeen the Open Knowledge Foundation Germany [2] and the German federal ministry of education and research [3].
they fund public-interest open source projects, several per funding round.