These are chat archives for TheWebShop/bootstrap-shortcodes

23rd
Aug 2015
Kevin Attfield
@Sinetheta
Aug 23 2015 06:10
I've created user interfaces for both the alerts and collapsible PRs. I've sent my own PRs back to their branches, and I'll give those guys a day or two to accept. If they don't get around to it however, I can just merge it all into the master repo myself.
then I'll push a new version to the wordpress plugin repository
Christian Zöller
@No3x
Aug 23 2015 09:30
Looks awesome
It would be cool to actually do the shortcode at the preview
Because it’s redundant to build the shortcodes output again in renderAlertPreview.
Kevin Attfield
@Sinetheta
Aug 23 2015 14:54
Ah, sure. But in practice those are two different times. The "insert shortcode" button always needs to exist, and it's the one that does top.tinymce.activeEditor.insertContent(shortcode); when it ends up in the real plugin.
So I kept it separate in the demo, so that the code would pretty much be a copy paste when it came time to implement.
Christian Zöller
@No3x
Aug 23 2015 15:22
But why not do something like renderAlertPreview() { $('#alert-demo').html( do_shortcode( alertShortcode() ); }
where do_shortcode is a js function that executes the shortcode via AJA(X) (there is not such a function yet - but imho this would be ideal)
So all the implementation logic for rendering would be at one place instead of two places
Christian Zöller
@No3x
Aug 23 2015 15:28
This are just thoughts for enhancement - it’s not an issue with the solution.
Kevin Attfield
@Sinetheta
Aug 23 2015 18:52
ooo, that is a pretty cool idea. Then the preview really is a true preview.
Christian Zöller
@No3x
Aug 23 2015 18:53
Exactly