I found it:
The special configuration option:
extraAllowedContent: '*[*]{*}(*)'
did the trick.
So the constructor I use is:
$('.wysiwyg').ckeditor({
toolbar : 'Basic',
extraAllowedContent: '*[*]{*}(*)'
});
Note that it's the "EXTRA" allowed content option, so it does not overwrite the default.
Update: It turns out that my special attribute had some & in it, and CKEditor was replacing them with the HTML entity &
. I added these two options:
entities: false,
basicEntities: false,
but they prevented that from happening in text nodes only, not inside attributes. Then I found this option:
forceSimpleAmpersand: true
and it worked. It'll be okay for now, but if eventually I have to put &
as part of any value --the entity, not just the & (this is usually required in content sharing links)-- the editor will break them, changing them to plain &.