Opened 14 years ago
Last modified 9 years ago
#9349 confirmed Bug
Custom style with anchor element fails — at Version 1
| Reported by: | Olek Nowodziński | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Core : Styles | Version: | 3.2.1 |
| Keywords: | Cc: |
Description (last modified by )
The following anchor style is invisible on the list of available styles:
CKEDITOR.stylesSet.add( 'default', [
{
name: 'Custom anchor',
element: 'a',
styles: {
'line-height': '18px',
color: 'red'
}
}
]);
The following code also fails:
var range = CKEDITOR.instances.editor1.getSelection().getRanges()[ 0 ];
new CKEDITOR.style( { element: 'a', ... } ).applyToRange( range );
It is visible when accessing via getStylesSet though:
CKEDITOR.instances.editor1.getStylesSet( function( stylesDefinitions ) {
console.log( stylesDefinitions );
});
>>> [ Object ]
This problem is only for element: 'a'. It works with p and similar.
Also in v3.
