added support for auto-detecting the format

This PR adds support for auto-detecting the format typed in rather the having to specify which one to use. Simply omit the data-format attribute and allow the user to type in or default in the format you want to use.

It may need some refinement but figured I share in case anyone else found this useful.

Let me know if you have any questions!