Let's say your code block is in a tiddler "mycode"
Paste this into a tiddler, call it and tag it with $:/tags/ViewTemplate
<$list filter="[all[current]prefix[mycode]]">
<$button>
<$macrocall $name="copy-to-clipboard" src={{mycode}}/>
</$button>
</$list>
Save, and clickon the tag $:/tags/ViewTemplate. Drag and drop "mytemplate" so it's just in front of the body tag. Now a button will appear on your mycode tiddler that will let you copy the code. Always make backups before trying changes like this.