does anyone know a method to extract the parameters and content from WordPress Shortcode Strings with Javascript or jQuery into an Javascript array or variables?
Shortcodes like this:
[button url="http://...." color="#00000"]Contact me![/button]
or like this:
[tabs]
[tab title="Title 1"]Content Tab 1[/tab]
[tab title="Title 2"]Content Tab 2[/tab]
[/tabs]
I tried to find a library or some working regex, but i couldn`t find some.
Situation:
I allready developed a shortcode generator, which generates shortcodes from values users has insert in input fields. Now i want the oposit way:
A user selects a shortcode in the editor and presses a button "edit with generator" and then the javascript gets the parameters from the shortcode. After that it opens the dialog from this shortcode using jquery-ui. Then it should fill the values into the matching fields into dialog, so that the user can edit them easily.
I think a matching javascript version of the wordpress function shortcode_atts() would do the job?!
Thx for your help!