# How to avoid the break of framed/shaded?

I have a problem with the framed environment. I am writing a document (article), and several parts of it have a gray background. Unfortunately, when a new page comes, such a shaded environment is cut in half :(

How can I avoid this? (with no use of \newpage...)

Example: In the document generated by this code, I would like the second shaded environment to be placed in the second page:

\documentclass{article}
\usepackage{framed,color}
\begin{document}
Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text
Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text\\Text
\end{document}

-

Although it sort of defeats the purpose of the framed package, you may enclose every shaded environment within a minipage (of width \linewidth) to prohibit page breaks. In my example I use the etoolbox package to patch the defintion of the shaded environment.

\documentclass{article}
\usepackage{framed,color}
\usepackage{etoolbox}