<strong><a href="#">This is the anchor text</a></strong>
<a href="#"><strong>This is the anchor text</strong></a>
<a href="#" style="font-weight:bold;">This is the anchor text</a>
<a href="#"><span style="font-weight:bold;">This is the anchor text</span></a>

Re: add styles to links instead of wrapping around links
Always apply the bold style as the inner most element.
config.coreStyles_bold = { element: 'strong', overrides: 'b', childRule: function( element ) { return false; } };Or even further, apply the bold inside of link element only:
config.coreStyles_bold = { ... childRule: function( element ) { return !element.is( 'a' ); } };Re: add styles to links instead of wrapping around links
config.coreStyles_bold = { element: 'strong', overrides: 'b', childRule: function( element ) { return !element.is( 'a' ); } }; config.coreStyles_italic = { element: 'em', overrides: 'i', childRule: function( element ) { return !element.is( 'a' ); } };for anyone looking for this
for anyone looking for this solution this is what i finally came up with
CKEDITOR.replace( 'youreditorname', {
coreStyles_bold: {
element: 'strong',
overrides: 'b',
childRule: function( element ) {
return !element.is( 'a' );
}
},
coreStyles_italic: {
element: 'em',
overrides: 'i',
childRule: function( element ) {
return !element.is( 'a' );
}
},
coreStyles_underline: {
element: 'span',
styles: { textDecoration: 'underline' },
attributes: { 'class': 'Underline' },
childRule: function( element ) {
return !element.is( 'a' );
}
},
font_style: {
element: 'span',
styles: { 'font-family': '#(family)' },
overrides: [ { element: 'font', attributes: { 'face': null } } ],
childRule: function( element ) {
return !element.is( 'a' );
}
},
fontSize_style: {
element: 'span',
styles: { 'font-size': '#(size)' },
overrides: [ { element :'font', attributes: { 'size': null } } ],
childRule: function( element ) {
return !element.is( 'a' );
}
},
colorButton_foreStyle: {
element: 'span',
styles: { color: '#(color)' },
childRule: function( element ) {
return !element.is( 'a' );
}
},
colorButton_backStyle: {
element: 'span',
styles: { 'background-color': '#(color)' },
childRule: function( element ) {
return !element.is( 'a' );
}
}
});
you can extend this to coreStyles_subscript etc etc but i did not require this