Opened 8 years ago
Closed 8 years ago
#16410 closed Bug (duplicate)
Images loaded in text is not responsive
Reported by: | michel | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Steps to reproduce
- load picture in text
- when double clicking on picture, a windows opens
- fill the word "auto" in the field for 'height'
- on clicking on "ok" a error message appears : height must be a number.
- also when adding max-width: 140px; in the html-source of the text, and switching to normal view, the added parameters are gone, ...disappeared.
Expected result
These days even a pictures shown on a webpage should be ready for a responsive website by adapting itself to a smaller screen. Thus by getting smaller. For making a picture to get smaller when watching a webpage on a smaller screen, such as a tablet, an iphone... the picture should get smaller automaticaly. For obtaining this, you need to have as css parameters : width:100%; height:auto; max-width:140px; The max-width is the actual real width of the picture.
Actual result
Now it's impossible to add "max-width" because it just disappears in the code. It's not accepted. Also the height in the window-box must accept the word "auto", now it just gives a error by saying that it isn't a number.
Other details (browser, OS, CKEditor version, installed plugins)
Browser version doesn't count, it's in your ckeditor codes, it was tested on the demo page !
Attachments (1)
Change History (2)
Changed 8 years ago by
Attachment: | ckeditor.png added |
---|
comment:1 Changed 8 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
You can use something like below:
var editor = CKEDITOR.replace( 'editor1', { disallowedContent : 'img{width, height}[width, height]', extraAllowedContent : 'img{max-width}' });
Please see: http://dev.ckeditor.com/ticket/12615#comment:11 and below comments.
To learn more about ACF, please see:
http://docs.ckeditor.com/#!/guide/dev_acf
http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
http://docs.ckeditor.com/#!/guide/dev_disallowed_content
http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addTransformations
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-extraAllowedContent
DUP of #12615
screenshot of an error