function ajax_markup in Ajax markup 6
Same name and namespace in other branches
- 7 ajax_markup.module \ajax_markup()
Create markup. Process posted input with posted format and return the result. Access to supplied input format is further checked by check_markup()
2 string references to 'ajax_markup'
- ajax_markup_menu in ./
ajax_markup.module - Implementation of hook_menu().
- ajax_markup_on in ./
ajax_markup.module - Load API files and settings.
File
- ./
ajax_markup.module, line 34
Code
function ajax_markup() {
$format = (int) (isset($_POST['format']) ? $_POST['format'] : FILTER_FORMAT_DEFAULT);
$output = isset($_POST['input']) ? check_markup($_POST['input'], $format, TRUE) : '';
drupal_json(array(
'output' => $output,
));
//sets text/javascript header
exit;
}