Quantization of radiation has been performed from first principles in a realistic molecular medium, represented by an arbitrary number of energy levels (electronic, vibrational, rotational, etc.) for each constituent molecule. Adopting a polariton model, the field operators have been expanded in terms of normal Bose operators for polariton creation and annihilation. The expansion coefficients have been derived explicitly for the normal modes characterized by wavelengths exceeding considerably the characteristic distance of separation between the molecules. Accordingly, the formalism applies to the long-wavelength region of the spectrum for which description in terms of the macroscopic refractive index is relevant; furthermore, consideration is restricted to the nonabsorbing areas of the spectrum. The theory has been formulated in a manner that made possible a parallel and comparative consideration of operators for both the averaged (macroscopic) and local fields. Consequently, the mode expansions derived cover both the local displacement-field operator and also the averaged (macroscopic) operators for the electric, displacement, magnetic, and polarization fields, and the vectorial potential. The expansions, involving summation over an arbitrary number of branches of polariton dispersion, manifestly embody the refractive influences as well. To this end, the local-field effects intrinsically emerge within the present formalism that treats systematically the photon umklapp processes. Relations have been established between the expansion components of the local and averaged field operators. The relationships support some previous attempts to link the amplitudes of local and macroscopic field operators phenomenologically, and are also consistent with the familiar results of classical electrodynamics. Equal-time commutation relations have been demonstrated to be preserved, expressing the operators for the averaged fields in terms of the normal Bose operators. On the other hand, the commutation relations between the macroscopic fields are of the same form as those for their microscopic counterparts, subject to the coarse-graining procedure. Finally, the present study dealing with the macroscopic and local operators provides a tool for combined investigation of both propagation of the quantized fields in molecular dielectrics and also interaction of the fields with the embedded molecules or atoms. \textcopyright{} 1996 The American Physical Society.