Opened 10 years ago
Closed 10 years ago
#13047 closed Bug (expired)
<figure> in stylesSet does not wrap <img>
Reported by: | Osvaldas | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Styles | Version: | |
Keywords: | Cc: |
Description
I define this in config:
stylesSet : [ { name: 'Figure', element: 'figure' } ]
In the editor, when I select an image (<img>) and then select "Figure" from the styles list, I get this (view source):
<figure alt="" src="img.jpg"> </figure>
...instead of this:
<figure><img alt="" src="img.jpg"></figure>
There's something wrong with <figure> treatment in the editor, because if I change "figure" to "span" in stylesSet, the image gets nicely wrapped.
Change History (4)
comment:1 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 4.4.7 |
comment:2 Changed 10 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
The question is why (and if - I didn't check) it works in the format plugin but not in the styles combo. They both use the style system in a very similar way.
comment:3 Changed 10 years ago by
Status: | reopened → pending |
---|
I have checked style in full package in every browser with enter mode set to P, Div and BR. It works fine as well.
I have used default editor and only altered the sample:
var editor = CKEDITOR.replace( 'editor1', { stylesSet : [ { name: 'Figure', element: 'figure' } ] });
@Reinmar if it pleases you I will leave this ticket open. @osvaldas if possible, please provide exact steps to reproduce this problem in default editor.
comment:4 Changed 10 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
Please use Format for that. You want to use single format tag so setting styles in no the right way to go here. Please use below:
You can style your figure element with custom class put in contents.css.