To append text immediately after the last displayed line, type
a
ed will then wait for the user to input text. It will leave append mode when a dot (.) is typed as the first and only character on a line, or when <CTL-D> is typed.