Append the selected text as a new line after the existing clipboard contents. If you hold down Shift (⇧), it will prepend instead. If you hold down Option (⌥), it will do it without a newline.
This is an extension for PopClip.
Interested in seeing how this works? View the source files for this extension on GitHub.