This project is not covered by Drupal’s security advisory policy.

Description

This ajax command works as ReplaceCommand from core but without adding div wrapper.

How to use

Load 'cleanreplacecommand/library' in your theme or attach it in a render array like this:

$form['#attached']['library'][] = 'cleanreplacecommand/library';

And use CleanReplaceCommand in your ajax callback like ReplaceCommand from core :

  public function testCleanReplaceCommand(){
    $response = new AjaxResponse();
    $response->addCommand(new CleanReplaceCommand('#your_id', '<span>some markup</span>') );
    return $response;
  }
Supporting organizations: 

Project information

Releases