Not sure I understand everything you want, but that’s the way you usually go about pasting code on the forum: