Templates can be found in the ACP:
ACP -> Appearance -> (Style) -> Templates
The specific templates you are looking for are editor and editor_smilies. If you'd like to change the placement, you may need to modify JavaScript, I haven't attempted to do this.