Hi, thanks for the module, I find it very useful.

It would be nice if the image does not remain shifted to the left, but centered when I select Image alignment - Image is inline with the text.

I added these lines to my css file
.imgupl_floating_none
{
text-align:center;
}

Could you add the line to the CSS of the module?
sites\all\modules\wysiwyg_imageupload\plugins\imgupload\imgupload.css
.imgupl_floating_none
{
float:none;
display:block;
text-align:center;
}

Thanks.

WYSIWYG Image upload 6.x-2.8
jQuery Update 6.x-2.0-alpha1
jQuery UI 6.x-1.4 (1.7.x)
Wysiwyg 6.x-2.1 (CKEditor 3.4.2)

CommentFileSizeAuthor
#4 none_left_float.png297 byteseletre
#4 none_right_float.png288 byteseletre
#2 none_float.png244 byteseletre

Comments

eugenmayer’s picture

Well i think we dont need the center-feature as part of the module, its easy to set it using CSS the way you did it.

Why do we need those settings?

{
float:none;
display:block;
text-align:center;
}
eletre’s picture

StatusFileSize
new244 bytes

We need text-align:center to reflect the displayed image. (Image is inline with the text (none))
See attached image.

Otherwise the image is shifted to the left. (Firefox and IE)

I am forced to put "text-align:center" in each active theme or create a new module with function

function MYNEWMODULE_init()
{
drupal_add_css(drupal_get_path('module', 'MYNEWMODULE') . '/mynewcss.css');
}

Only for this.

eugenmayer’s picture

actaully is it right to suggest that "no float" means "Centered"? I dont mind it really, but what would be the default?

eletre’s picture

StatusFileSize
new288 bytes
new297 bytes

One solution would be to use the images I have attached below, and change in the file wysiwyg_imageupload.form.inc the array for $form['image_upload_details']['alignment']

 $form['image_upload_details']['alignment'] = array(
    '#type' => 'select',
    '#title' => t('Image alignment'),
    '#options' => array(
      'imgupl_floating_left' => theme('image',"$m/images/left_float.png", $t = t('Image on left, text on right'), $t),
       'imgupl_floating_none_left' => theme('image',"$m/images/none_left_float.png", $t = t('Image is inline with the text (left)'), $t),
      'imgupl_floating_none' => theme('image',"$m/images/none_float.png", $t = t('Image is inline with the text (centered)'), $t),
     'imgupl_floating_none_right' => theme('image',"$m/images/none_right_float.png", $t = t('Image is inline with the text (right)'), $t),
      'imgupl_floating_right' => theme('image',"$m/images/right_float.png", $t = t('Image on right, text on left'), $t),      
    ),
    '#default_value' => $defaults['alignment'],
    '#after_build' => array('drupalwiki_imageselect_element_register'),
  );

... and modify imgupload.css

.imgupl_floating_none
{
float:none;
display:block;
/*plus*/
text-align:center;
}

/* new */
.imgupl_floating_none_left
{
float:none;
display:block;
text-align:left;
}

/* new */
.imgupl_floating_none_right
{
float:none;
display:block;
text-align:right;
}

What do you say?

eugenmayer’s picture

Well eventhough i like the idea, i think we should make those 2 options "optional" enableable in the admin menu. I think a lot of users get confused by 5 buttons. They are mostly used to the 3 "general" ones.

what do others think on this topic.

In any way, thank you for your effort and contribution, this will be part of 2.9, one or the other way :)

eugenmayer’s picture

Well after discussing it, i think it should get into the default plugin, so we end up with 5 buttons. Thanks for the work, will be part of 2.9 as suggested before

eugenmayer’s picture

Status: Needs review » Fixed
eletre’s picture

Thanks. It is nice to feel useful.

eugenmayer’s picture

Status: Fixed » Closed (fixed)

released with 2.9