Hi,
it should work within the texts. Not supported are any onBefore... or onAfter... The cookbook is parameter controlled and not developer controlled. I hope you understand the difference.
Have a look on this where the Wiki extension is used to link to explanations.
I even know that a user tested to integrate a dia show into a cookbook text. This worked but he and I thinks this is not a good idea. Be aware that anything you add to the textareas may be a problem if you want to upgrade and this "anything" is not available to the upgrade.