-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible integration with Gutenberg #752
Comments
A Gutenberg-shim? |
Kind of, at least that was the idea & thanx for correcting |
Copying some of my comments regarding Shortcake and Gutenberg from https://davisshaver.com/2017/07/15/playing-with-gutenberg-for-the-first-time/
See also: |
@westonruter Thank you for your reply, I did not read the article on davisshaver before, very interesting. Of course extending the Shorcode block to have attributes seems like the most natural way of doing the porting, this would require the Shortcode block to be 'extensible'. A bit out of topic but not completely out of the ball park is the new I can also see many use case for storing the block as postmeta, anything with the google maps api for example. |
@antekdesign @westonruter +1... Maybe we can see a Shortcake block and then figure out extending to any block -> post meta link later. @antekdesign For the className question I think that's a Gutenberg question, My understanding is it would be possible to do pure React blocks through Gutenberg but in the case of Shortcake block I believe we'd be focused on porting PHP shortcodes. |
@davisshaver you're absolutely right it the Do you think, considering the current course of events, that Shortcake should have it's own block rather than extending the core WordPress Shortcode block to come? |
I've started a shortcake-to-gutenberg shim plugin here: https://github.com/wp-shortcake/shortcake-gutenberg This is very rough still - it takes any shortcodes registered with shortcode ui in the format defined by Shortcake, and registers Gutenberg blocks for them. The block content is the same as the shortcode - so there should be no special front-end rendering logic required beyond what's already defined with the As of now, all the attribute field types are basic rendered as text fields, but there are open issues to develop fields matching all of the existing field types (post select, attachment select, and so on). Many of those already exist as Gutenberg components and just need to be extended a bit for inclusion. |
Hi guys,
The Gutenberg editor will 'demote' shortcodes since blocks are the evolution of shortcoded it makes sense that in time all shortcodes will be converted into blocks.
The key concept here is IN TIME. As for today there are some stuff that are still better as shortcodes than blocks, one example is the SoundCloud player. With the standard Oembed you cannot customize the color or the player type Visual or Simple... This is one example but there are many that I could bring up.
Shortcodes work in Gutenberg but they do not have a UI or a preview and I don't think this it's gonna change.
There is a shortcode block in the works and @iselude is working on bringing all the current (I don't like to say old) editor functionalities, including custom TinyMCE buttons into the Classic Editor block.
One option, could be to call the Shortcake UI from a TinyMCE button instead of a media button, that way it could be easily integrated into the Classic Editor block but I do not think it could have a preview.
Another option could be to have a Shortcake Block that let you select the Shortcode you want to insert, shows the Editing Ui and, for example, displays the Shortcode icon in the preview, not as good UX as rendering the Shorcode but better than the square bracketed version.
Do you think any of the above could be doable?
I am willing to help if you want.
The text was updated successfully, but these errors were encountered: