Added a support to set javascript id in fig_to_html.
Made the documentation more clear
Changed javascript_id to figure_id
figure_id can be selected directly
fixed a typo
figure_id must follow [a-zA-Z0-9_]* regex
Added anonymous functions
fixed figure_id value checking and added anonymous function
added anonymous functions
added json.dump to figure id
BUG: fix figid->JSON conversion