Thumbnails + Responsive Images in Content Block

Permalink
A couple questions...

1) Is there a way to add an inline image to a content block via redactor?

Redactor (or at least C5's implementation) seems to insist that each inserted image be wrapped in its own "p" tag. Why? Is there any way around that?

2) Is there a way to insert a particular thumbnail type via redactor?

C5 seems to assume that you always want a higher resolution image with wider viewports. But what if I want to insert a lower res (optimized) version of an image into a sidebar? How do I accomplish that?

On a related note, how do I apply classes to an image inserted via Redactor (without editing the HTML)?

Thanks for any help,

-Steve

Shotster
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi Shotster,

The wrapping of images in <p> tags seems to be something Redactor is doing on its own. I went to the Redactor site and looked at how the demo works. Images in the demo are wrapped in <p> tags. Removing them looks like it would require modifying redactor.js.
http://imperavi.com/redactor/

For adding classes to images, I made a Redactor plugin. To apply a class, the image needs to be drag selected (highlighted blue) with the mouse or keyboard or the cursor needs to be directly before or after it.

Add and Remove Classes and ID's
http://www.concrete5.org/download_file/-/79131/...
Shotster replied on at Permalink Reply
Shotster
Thanks, Karl, I'll look into it.

-Steve
blinkdesign replied on at Permalink Reply
blinkdesign
mr. karl D.
thanks for the phantastic plugin, - i makes me go home earlier this weekend.
you too have a good weekend.
regards from zurich.
blink
MrKDilkington replied on at Permalink Reply
MrKDilkington
@blinkdesign

Currently it supports block elements, links, and images.

I plan on adding table support.

Is there anything else you could see being useful to add?
blinkdesign replied on at Permalink Reply
blinkdesign
mr. karl D.
i'm happy with the table update. you create code before people realize that it is useful. thank you.

blink.
MrKDilkington replied on at Permalink Reply
MrKDilkington
I updated the Add Remove Classes and IDs plugin to support tables.
http://www.concrete5.org/download_file/-/81802/...

5.7.4 broke setting attributes on images. This pull request will fix it.

"Fixes #2576 by saving all attributes on the img tag. #2773"
https://github.com/concrete5/concrete5/pull/2773...