toolsSmartDomDocument > Documentation

This plugin include a new Class easily callable by another plugin.

Usage

The primary purpose is to manipulate HTML just before shown. Exemple of usage for beforeQuestionRender ANSWERS. Not using regexp, because find id or element in HTML is more stable.

The class can be easily imported using $dom = new \toolsDomDocument\SmartDOMDocument();. After 2 function extend php DOMDocument are added.

  • loadPartialHTML : to load the HTML of answers
  • saveHTMLExact : to get exact HTML updated.

Download

Get this plugin on Gitlab or on this link

View online : Gitlab repository