Skip to content

Instantly share code, notes, and snippets.

@Reinmar
Created October 13, 2015 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Reinmar/05e61294fec0d282a171 to your computer and use it in GitHub Desktop.
Save Reinmar/05e61294fec0d282a171 to your computer and use it in GitHub Desktop.
var editor = CKEDITOR.replace( 'editor1', {
plugins: 'wysiwygarea'
} );
editor.on( 'instanceReady', function() {
editor.addCommand( 'foo', {
allowedContent: new CKEDITOR.style( {
element: 'a',
attributes: {
'!href': '',
'target': ''
}
} ),
requiredContent: new CKEDITOR.style( {
element: 'a',
attributes: {
href: ''
}
} )
} );
editor.addFeature( editor.getCommand( 'foo' ) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment