Hello! Is it somehow possible to use a WYSIWYG-Editor to write the captions for colorbox?

Comments

maki3000 created an issue. See original summary.

Anonymous’s picture

Status: Active » Needs review

If you are creating this not in a view and using views integration, the html will have to be url encoded, using rawurlencode() for instance.

Depending on how you are building your link, you could use drupal_http_build_query() to build your entire link, similar to how it is done in colorbox_handler_field_colorbox.inc

    $link_options = array(
      'html' => TRUE,
      'fragment' => 'colorbox-inline-' . $i,
      'query' => array(
        'width' => $width,
        'height' => $height,
        'title' => $caption,
        'inline' => 'true',
      ),
      'attributes' => array(
        'class' => array('colorbox-inline'),
        'rel' => $gallery_id,
      )
    );
    // Remove any parameters that aren't set.
    $link_options['query'] = array_filter($link_options['query']);

    // If the nid is present make the link degrade to the node page if
    // JavaScript is off.
    $link_target = isset($values->nid) ? 'node/' . $values->nid : '';
    $link_tag = l($link_text, $link_target, $link_options);
Neslee Canil Pinto’s picture

Status: Needs review » Closed (won't fix)