From what I know, I don't think you can add HTML to a chapter? Please correct me if I am wrong. Well, just reread: It seems like you want to upload an HTML file for others to download. (Actually no, you want the code to show up, which is impossible for SH editor, I don't care anymore... My brain is not functioning well, correct me if I am wrong fellow forum people)
It should be impossible for SH editor but there are workarounds, such as uploading it on a file hosting site like Mega or something, then inserting the link for that instead. (This is a risk for readers though, as they could be downloading malware which is why I personally didn't want to throw that)