It feels like you’re using CKEditor 4.1+ that comes with Advanced Content Filter (ACF). If so, you need to specify config.allowedContent
and configure it to get your things working. You may also be interested in config.extraAllowedContent
.
See this answer for more details.