Is it better to contact a publisher early in the writing process so that the editor can be involved in shaping the project, or is it better to submit a full academic book manuscript? In my case, this would be for a first academic book. If this is something that is dependent on particular academic fields my field is digital humanities.
Book writing is a very thankless task—it takes a long time, and the profits probably don't make up for the cost of the time it takes you to write the book, unless you happen to write a textbook that becomes the default for a field. On the other hand, in some disciplines (particularly in the humanities), a published book is practically a requirement for tenure, so you'll want to make sure that you do things right.
So my advice would depend upon where you are in the process. If you haven't already started writing, I'd shop around a prospective outline of the book plus an introductory chapter or two before you get too much further. Then you'll have a sense of what the publishers would be interested in. If you've gotten a lot written, then you just need to start shopping the full idea around.