Changes between Initial Version and Version 1 of Ticket #8033, comment 5
- Timestamp:
- Sep 27, 2012, 1:04:03 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #8033, comment 5
initial v1 1 There are 2 problems I see with this code: 2 1 3 **Extra width/height** - This is happening because you are trying to change fake element width/height to original element width/height. This is impossible or to be more specific there is no easy way to do it.[[BR]] 2 4 To change fake element dimensions you have to modify cke_fakediv class and not fake element. 3 5 Please check out the attached plugin it contains code in comments in afterInit method. This code changes initial width and height but the problem is that it will work only after you switch to source for the second time.[[BR]] 4 ** Theconclusion here is that you can and should only give fixed dimensions in CSS class** (cke_fakediv in this case).6 **MY conclusion here is that you can and should only give fixed dimensions in CSS class** (cke_fakediv in this case). 5 7 6 **Extra paragraphs** - I think it has to do with how parser works and IMHOit can't be fixed. Fake element is represented by img which in editor is seen as inline (isBlockLike property is false). Div on the other hand is block element. [[BR]]8 **Extra paragraphs** - I think it has to do with how parser works and **IMHO** it can't be fixed. Fake element is represented by img which in editor is seen as inline (isBlockLike property is false). Div on the other hand is block element. [[BR]] 7 9 **This is what I think is happening** - Every time you switch between wysiwyg and source, editor sees: image and wraps it in paragraph but then image is changed into div so it is being moved out of paragraph and so on.[[BR]] 8 The only way to work around this problem is to change div to some kind of inline element like span which is ok if this element won’t contain other elements. 10 The only way to work around this problem is to change div to some kind of inline element like object/iframe or span (which is ok if this element won’t contain other block elements).[[BR]] 11 **MY conclusion here is that you can only use inline elements to replace them with fake element** 9 12 10 I would like to hear what other members of CKSource think of this. 13 I would like to hear how other members of CKSource see this and if I'm wrong what is the proper solution. 14