I'm confused about the form of the quantized electromagnetic field.
Sometimes, one writes the quantized electric field as
$$\hat E = \vec E_0(\hat a + \hat a^†)$$
, which can been seen the website below in the section, "Mathematical formulation 1".
https://en.wikipedia.org/wiki/Jaynes%E2%80%93Cummings_model
But as I know, the quantized electric field as
$$\hat E(r) = i\vec E_0(\hat a(k)e^{ikr} - \hat a^†(k)e^{-ikr})$$
for a given wavevector $k$ and position $r$.
This can be found in the below website.
https://en.wikipedia.org/wiki/Quantization_of_the_electromagnetic_field
I wonder why the two forms are different.
Please help me out.