wp-shortcake / shortcake

Shortcake makes using WordPress shortcodes a piece of cake.
GNU General Public License v2.0
664 stars 143 forks source link

Can non-parameter wrappers be used? #674

Open dartiss opened 7 years ago

dartiss commented 7 years ago

I have a number of plugins that have shortcodes that have no parameters. Instead they wrap around, say, some text to apply a change to it. However, I can't see a way to achieve this as Shortcake only inserts the opening shortcode and doesn't allow for highlighting of content either (where it would then, ideally, put start and end shortcodes around the selected content).

I know it doesn't seem to add much benefit using Shortcake in this instance, as no parameters are required, the ease of looking up the functionality from an iconised menu, rather than remembering the shortcode name, does indeed provide a benefit that I'd, ideally, like to take advantage of.

Any thoughts on this will be appreciated.

goldenapples commented 7 years ago

No, there hasn't been any real progress on being able to use Shortcake views for wrapper shortcodes like that. I think it would be great to have a UX brainstorm to mock up some concepts of how that could look in the editor. As it stands, I don't have any concept of how rendering these types of shortcodes in the editor would work, other than possibly adding "start" and "end" markers and indenting the text inside of them.

dartiss commented 7 years ago

I'm happy to assist anyway I can.

It's possible now using the inner content to add something from Shortcake but what's really needed is an ability to highlight content before heading into Shortcake for this to be added in as a default value. The same with then editing - picking up the content for editing as part of the other shortcake fields is really needed. In my own experience, most shortcodes have start/end markers and content between.