function bueditor_form_button in BUEditor 5
Template form for buttons
1 call to bueditor_form_button()
- bueditor_form_editor in ./
bueditor.module - Editor form.
File
- ./
bueditor.module, line 109
Code
function bueditor_form_button($button = NULL) {
$button = (object) $button;
$form = array();
$form['title'] = array(
'#type' => 'textfield',
'#default_value' => $button->title,
'#size' => 14,
);
$form['content'] = array(
'#type' => 'textarea',
'#default_value' => $button->content,
'#rows' => min(10, max(2, substr_count($button->content, "\n") + 1)),
);
$form['icon'] = array(
'#type' => 'select',
'#options' => array(
'' => t('Caption'),
) + bueditor_icons(),
'#default_value' => $button->icon,
);
$form['caption'] = array(
'#type' => 'textfield',
'#default_value' => bueditor_isimage($button->icon) ? '' : $button->icon,
'#size' => 6,
);
$form['accesskey'] = array(
'#type' => 'textfield',
'#default_value' => $button->accesskey,
'#size' => 2,
'#maxlength' => 1,
);
$form['weight'] = array(
'#type' => 'weight',
'#default_value' => $button->weight,
);
return $form;
}