Recommended releases

Download Released

Provides an API for generating filtered markup using ajax. It supports BBCode, Markdown, Textile, HTML, PHP, and any other markup system provided as a Backdrop module. It provides an ajaxified version of check_markup(). Ajax Markup is also fully integrated into BUEditor.


  • Install this module using the official Backdrop CMS instructions at
  • To use with BUEditor first enable ajax_markup before enabling BUEditor in order to have the Preview button to appear automatically. Otherwise manually add the button code to BUEditor: js: E.prvAjax();


  1. Load the API by calling ajax_markup_on() at server side.
if (module_invoke('ajax_markup', 'on')) {
  1. Inside YOUR_SCRIPT.js call $.ajaxMarkup

  if (SUCCESS) $('div#preview').html(OUTPUT);
  else alert(OUTPUT);

INPUT: String of which you want to get a filtered version.
INPUT_FORMAT: Integer representing one of the Backdrop input formats. Provide 0 for the default.
CALLBACK: Function to send the output after the request.
OUTPUT: String that is the filtered INPUT. Content depends on the INPUT_FORMAT and SUCCESS state.
SUCCESS: Boolean representing the status of the request.
REQUEST: XmlHttpRequest. Not available when the OUTPUT is retrieved from the cache.

API provides a function that tries to get the INPUT_FORMAT of a textarea.

$.ajaxMarkup.getFormat('#edit-body'); //returns 0 (the default format) when there is no input format for the element.


Users must have "access ajax markup" permission.
Users must have access to the supplied INPUT_FORMAT, otherwise the default format is used.


This project is GPL v2 software. See the LICENSE.txt file in this directory for
complete text.

Current Maintainers

Maintained by Alan Mels


Ported to Backdrop by Herb v/d Dool (

This module was originally written for Drupal ( Drupal maintainers are: ufku.