data-attribute-parser
jQuery helper plugin to parse data-
attributes and load other plugins using that parsed attributes as plugin params.
How to use it?
Here's an example on how to load ckeditor (it's an example!) on textarea inputs. Assuming you have some textareas like the following:
This textarea won't have CKEditor enabled This textarea will have CKEditor enabled with the specified values
Now parse the params and load the plugin:
;
WARNING: camelCasedValues are lowercased by the DOM, so you will need to declare that attributes as dashed-attributes and they will be converted to camel cased (i.e.
dashed-attributes
todashedAttributes
).