I ran into this simple problem today. When the
</textarea> tag is used as a string in your code it will be used to close the snippet editor's textarea. This can be replicated using this line:
$test ="</textarea>some other stuff";
"some other stuff" will be printed after the snippet editor.
simple fix for this without editing the code snippets plugin would be to break up the textarea tag in your code like so...
$test ="</"."textarea>some other stuff";