Skip to content

Conversation

No3x
Copy link
Contributor

@No3x No3x commented Aug 24, 2015

Do shortcode via ajax to get a real preview. This avoids building the shortcode parsing logic for preview once again in the js.

Feel free to squash.

fburatti and others added 7 commits August 20, 2015 17:58
With the new "dismissible" option, we need a more complex UI
so let's add a small form for inserting alerts.

This one includes a "preview" pane to see the alert type which
will be added.
… shortcode parsing logic for preview once again in the js.
@No3x
Copy link
Contributor Author

No3x commented Aug 31, 2015

@#58 (comment) @Sinetheta This was because the " in the shortcode string were escaped. So this was passed to do_shortcode: [bs_notification type=\"warning\" dismissible=\"true\"]Your content here.[/bs_notification]. Hence do_shortcode was unable to extract attributes. The reason for the escaping is somewhere in http://api.jquery.com/jQuery.ajax/#options .. dataType or something. I was not able to fix this client side so I added wp_unslash on the other end.

@No3x
Copy link
Contributor Author

No3x commented Aug 31, 2015

PR should make sense now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants