Sorry but there's no way I have seen. I state that quite categorically as what will hopefully happen is that someone will now respond they do know a way.
I'm not sure I would agree what you want is basic functionality but I do understand your need for it.
The more people who request a feature, the more likely it is to be actioned. Please follow this link.
See www.grainge.org for RoboHelp and Authoring tips
I'm not posting to say "well all you have to do is..." but I do see something that might work for you.
You stated that RoboHelp adds: <rhignored? = "text to be ignored".>
So it strikes me that you might dabble in the source code a tad and just manually use that code to surround your code block.
What I'm unsure about, however, is if RoboHelp will respect it and leave it alone when you return to the Design view. Oftentimes we see RoboHelp behaving like a four year old where it tries to "help you out" by making unwanted changes that way.
When I get a bit of time, I'd like to request such a feature, to ignore text. I think of it as basic because I can skip o ver text I do not want spell checked using other desktop publishing, such as FrameMaker, and other word processors.
Thanks for the advice. I'll pass it on to the person who will assume responsibility for the project. The rhignored tag precedes text to be ignored, and this tag does not have a closing tag. You put all text to be ignored inside the quotation marks, so essentially, you would be copying all the code into the quotation marks, then following with the actual code sample. If I have time, I will try it on a test project I set up.