This is only possible with some formats, like Moodle XML. The simple text formats cannot handle it.
I just migrated from Moodle 1.9 and I am having problems on how to write my quizzes so students can open up a .pdf attachment. The "Print and solve this problem" is a link in the course to a pdf. How can I do something like this in Moodle 2.4? Here is what I have been using:
<p><a href="https://www.class4me.me/file.php/17/Quizzes/Chapter1/1-1-1/1-1-1-1.pdf" target="blank"><span style="color: #0000ff;"> Print and solve this problem, </span></a>then select the most appropriate answer below.</p>