Use the designer and put the code in the Content *PlaceHolderAdditionalPageHead*

@Colbs on StackExchange: [Question on StackExchange][1]


 [1]: https://sharepoint.stackexchange.com/questions/109614/script-editor-webpart-ribbon-problems