Hello,

I'm using CKeditor with asset module and everything works nice, but I have an issue or request.
I'm trying to get the alignment options when you select any of the available options in Display mode.

Now with the default display mode "small" you can't align your image.
image 1

But with any other you can.
Image 2

I would like to align any of my display modes.
I've tried the las dev version but I have the same problem.

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

newtone’s picture

Subscribing

kholloway’s picture

Issue summary: View changes

FYI, this is currently hard coded into the module itself to only allow the "align" form option to be added if the display mode is "small". Until this is changed a temporary work around is to add the following hook to a custom module:

/**
 * Implementation of hook_form_alter()
 */
function YOURMODULENAME_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'assets_wysiwyg_form') {
    if ($form['#bundle'] == 'image') {
      // If showing the wysiwyg asset form for an image make the align option
      // visible for all display types
      unset($form['align']['#states']);
    }
  }
}

All this does is alter the asset image form to remove the show/hide toggle condition if the display mode is "small". This worked just fine for me with other display modes/sizes of images.

joscar’s picture

Attached is a patch to allow alignment options for all display modes.

joscar’s picture

Revising patch to ensure CSS classes are also included in every display mode.

gmclelland’s picture

Status: Active » Needs review

Patch attached.. Setting to NR

DrColossos’s picture

We are running with the exact same solution as the posted patch to enable alignments for all modes.