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?
Comments
Comment #1
jelle_sPatch 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.).
Comment #2
attiks commentedThis applies cleanly and works well.
Comment #3
bcostlow commentedThis 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..
Comment #3.0
bcostlow commentedEdit code error