Open mralessio opened 7 years ago
Hmm not really. This library is a pretty opinionated one, so it would be difficult to change something like that (though probably not impossible).
Finally I've managed to solve all things by extending Shortcode_Button class. So now I have all attributes appear in shortcode as I wished as well as textarea for the shortcode content.
Anyway thank you, Justin. Really appriciate your work over this library.
Oh nice, that's a good way to handle it.
One issue I've come across in case a file field. I test it also without any of my modifications. The same. If I select an attachment initially, the image is displayed as usually in a preview area (inside .cmb2-media-status). After inserting and then trying to edit the shortcode, the file field in modal appears already without the preview . Though it is populated with the image url and id correctly as I see it. The preview reloaded only after reselect the image.
When I use the file field type, I get the shortcode with id and id_id like:
[inlayimage id="http://test.dev/wp-content/uploads/4618102_large.jpg" id_id="1017"][/inlayimage]
In case of file_list it puts it as an array:
[inlayimages ids="{'1017':'http:\/\/test.dev\/wp-content\/uploads\/4618102_large.jpg','1010':'http:\/\/test.dev\/wp-content\/uploads\/posts\/60-very-interesting-post-lets-read-it\/cities_new_york.jpg'}" /]
Can I in any way have a plain shortcode markup like:
[inlayimage id="image_ID"]caption[/inlayimage]
and[inlayimages ids="image1_ID, image2_ID, image3_ID" /]
?