Dragons and other fantastic beasts often appeared in the marginalia (notes in the margins) or decorative borders of medieval manuscripts. Sometimes the images were related to the text, often they were not.
To learn more about the history of dragons, see The Evil, Medieval Ancestors of Modern Dragons
13th-14th century English manuscript; Courtesy of the British Library Catalogue of Illuminated Manuscripts.