jejacks0n/mercury — pull request #146 by mixonic (2012-01-24 15:06:55+00:00)
Title: Add determineType for programatically deciding what type a region is

This adds an option for deciding what regions are what type. For instance, I'm using it to set all divs to editable and some other tags to a 'simple' type. A hard-coded `data-type` attribute on the DOM still has precedence.

Example:

``` javascript
determineType: function(region){
if (region.get(0).tagName == 'DIV')
return 'editable';
else if (region.get(0).tagName.match(/(H[1-5]|LI|SPAN|STRONG|EM|B|I|TD)/))
return 'simple';
else
return false;
},
```