How much is an editor paid? How much is an editor of a typical research journal (e.g., with annual 12 issues and 5,000 pages) paid?

I talked with a book editor, and he said he received less than $3,000 of the book sales for a research book with over 1,000 pages and 30 chapters.

I am curious if is it comparable to a full salary or is it just an honorarium, and editors provide this service because of scientific prestige only?
Typically journal editors are volunteers. I suppose for some of the flagships (Nature, Science, Cell, etc.) they might have full-time paid editors, but your typical niche research journal editor doesn't get much if anything at all.