You can add custom code in the following ways:
Adding code to several pages
Add the code in the templates:
Editing the Source code of a specific page
Within the document editor select the Source button; the HTML source code of the article will now be displayed.
Click the Source button again to return to the article. You could then preview it before selecting Save to commit your changes.