You are here

function imce_process_textarea in IMCE 5

Inline image/link insertion to textareas.

File

./imce.module, line 782

Code

function imce_process_textarea($element, $edit = NULL, $ids = array()) {
  if (in_array($element['#id'], $ids)) {
    drupal_add_js(drupal_get_path('module', 'imce') . '/imce_set_inline.js');
    $element['#description'] .= '<div style="display:none">' . t('Insert !image or !link.', array(
      '!image' => l(t('image'), 'imce/browse', array(
        'name' => $element['#id'] . '-IMCE-image',
        'class' => 'imce-insert-inline',
      )),
      '!link' => l(t('link'), 'imce/browse', array(
        'name' => $element['#id'] . '-IMCE-link',
        'class' => 'imce-insert-inline',
      )),
    )) . '</div>';
  }
  return $element;
}