I would like to see Drupal's Input Formats used so that everything associated with them can be used such as WYSIWYG, etc.

I have changed:

function markup_field_settings_form($field, $instance, $has_data) {
  $form = array();
  $settings = $field['settings'];
  $form['markup'] = array(
    '#type' => 'textarea',
    '#title' => t('Markup'),
    '#default_value' => isset($settings['markup']) ? $settings['markup'] : '',
    ...

to

function markup_field_settings_form($field, $instance, $has_data) {
  $form = array();
  $settings = $field['settings'];
  $form['markup'] = array(
    '#type' => 'text_format',
    '#format' => isset($settings['markup']['format']) ? $settings['markup']['format'] : '',
    '#title' => t('Markup'),
    '#default_value' => isset($settings['markup']['value']) ? $settings['markup']['value'] : '',
    ...

and

function markup_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  $element += array(
    'markup' => array(
      '#markup' => $field['settings']['markup'],
    ),
  );
  return $element;
}

to

function markup_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  $element += array(
    'markup' => array(
      '#markup' => check_markup($field['settings']['markup']['value'], $field['settings']['markup']['format']),
    ),
  );
  return $element;
}

I don't use git so can't create a patch for this, can this be added into the module?

CommentFileSizeAuthor
#1 i1600436-1.patch1.54 KBjelle_s

Comments

jelle_s’s picture

Status: Active » Needs review
StatusFileSize
new1.54 KB

Patch based on previous comment. It would be great if this would get fixed as it is much more user friendly (for filtered HTML Web page addresses and e-mail addresses turn into links automatically, etc.).

attiks’s picture

Status: Needs review » Reviewed & tested by the community

This applies cleanly and works well.

bcostlow’s picture

Version: 7.x-1.x-dev » 7.x-1.1-beta1
Status: Reviewed & tested by the community » Closed (fixed)

This has been added to the 7.x-1.1-beta1 release. Note: that release automatically handles changes made by any patches in this issue and #1387420: Output raw markup doesn't work..

bcostlow’s picture

Issue summary: View changes

Edit code error