By extending ideas and methods of Dudley (1977) (who was dealing with the Brownian case), we prove that a necessary and sufficient condition for all martingales of a given filtration $(\mathscr{F}_t)$ to be continuous, is that, for every stopping time $T$ and every $\mathscr{F}_T$-measurable random variable $X$, there exists a continuous local martingale $M$ with $M_T = X$ a.s. Moreover, $M$ can be chosen such that $M_0 = 0$ on a reasonably large event (equal to $\{T > 0\}$ in the Brownian case); if there exists a Brownian motion $B$ adapted to $(\mathscr{F}_t), M$ can be chosen as a stochastic integral of some $(\mathscr{F}_t)$-predictable process with respect to $B$ (even when $(\mathscr{F}_t)$ is larger than the natural filtration of $B$).