Ins: utilities

Back to Ins homepage


1. Custom extension

There is a way to add custom ins- attributes: the ins.php file creates global $ins_attr associative array where you can add your own handler:
$ins_attr["ins-smiley"] = function($node,$data,$att) {
  $node->nodeValue.= " :-)";

<div ins-smiley>Don't worry be happy</div>


Don't worry be happy :-)

Attribute handler

These are the parameters the handler receives:

2. Error reporting

For time being, this feature is not implemented yet. To get some more debugging info, uncomment the $errors = libxml_get_errors(); at the end of the source code and add any error reporting you desire.