Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CKEditor Defining custom margins for inserted image

I met a limit with quite typical operation. Simple document: http://i.stack.imgur.com/JNI9v.png

As you can see, image has right and bottom margins. But... CKEditor image dialogue provides VSpace and HSpace parameters which influence together to Top-Bottom or Left-Right twin values and adds unnecessary top and left margins: http://i.stack.imgur.com/vo3oC.png

Of course, users won't use pure code to define this in style="..." attribute. So, how to allow users insert images as shown on the first image? Maybe exists CKEditor plugin or patch... and i just can't find it.

like image 279
Stan Avatar asked Apr 10 '12 12:04

Stan


1 Answers

Another, maybe even a simpler way, to achieve what you want would be to use a predefined set of styles for images and use the "Styles" combo to apply one of preselected classes. This way the styles used for images could be more consistent.

To see what I mean you can check the "Standard" demo - click on an Image and in the "Styles" combo select "Object styles -> Styled image (right)"

like image 107
Wiktor Walc Avatar answered Oct 08 '22 00:10

Wiktor Walc