src/BoomCMS/Chunk/BaseChunk.php
public function addAttributesToHtml($html)
    {
        $html = trim((string) $html);

        $attributes = array_merge($this->getRequiredAttributes(), $this->attributes());
        $attributesString = Html::attributes($attributes);

        return preg_replace('|<(.*?)>|', "<$1$attributesString>", $html, 1);
    }
public function addAttributesToHtml($html)
    {
        $html = trim((string) $html);

        $attributes = array_merge($this->getRequiredAttributes(), $this->attributes());
        $attributesString = Html::attributes($attributes);

        return preg_replace('|<(.*?)>|', "<$1$attributesString>", $html, 1);
    }
public function addAttributesToHtml ( $ html ) { $ html = trim ( ( string ) $ html ) ; $ attributes = array_merge ( $ this -> getRequiredAttributes ( ) , $ this -> attributes ( ) ) ; $ attributesString = Html :: attributes ( $ attributes ) ; return preg_replace ( '|<(.*?)>|' , "<$1$attributesString>" , $ html , 1 ) ; }
This adds the necessary classes to chunk HTML for them to be picked up by the JS editor.
i.e. it makes chunks editable.

@param string $html HTML to add classes to.

@return string
This adds the necessary classes to chunk HTML for them to be picked up by the JS editor . i . e . it makes chunks editable .