Opened 13 years ago
Last modified 8 years ago
#9349 confirmed Bug
Custom style with anchor element fails — at Initial Version
Reported by: | Olek Nowodziński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Styles | Version: | 3.2.1 |
Keywords: | Cc: |
Description
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.