Skip to content
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

Basic developer questions about Gutenberg conversion #4670

Closed
dartiss opened this issue Jan 25, 2018 · 5 comments
Closed

Basic developer questions about Gutenberg conversion #4670

dartiss opened this issue Jan 25, 2018 · 5 comments
Labels
[Type] Question Questions about the design or development of the editor.

Comments

@dartiss
Copy link

dartiss commented Jan 25, 2018

Just as an overview, I have a number of WordPress plugins in the repository. I have a good knowledge of PHP and am, meh, at JavaScript - enough to get along. I'd probably regard myself as a typical plugin developer, for those not making a living from them. I'm an enthusiast.

Over the last couple of weeks I've been looking at what changes I can make to my plugins to prepare them for Gutenberg. As a result I have a number of queries which, it was suggested on the Slack channel, I bring here.

  1. For shortcodes that wrap around text (i.e. inline), what is the post-Gutenberg solution? A block isn’t suitable in this situation.
  2. Will Gutenberg work nicely with Shortcake (both projects have been posed this question but I can’t find a definitive answer). This would be a great solution for developers to add shortcode-based plugins into the GB environment without having to get involved with the step learning curve of block creation - i.e. if a shortcode-based plugin uses Shortcake (which is quite easy to integrate into) and then Shortcake deals with all of the block requirements of GB.
  3. Are there any plans for backwards compatibility of the Custom Fields meta-box? One of my plugins uses it and, come the launch of WordPress 5.0, it will no longer work as a result.
  4. Is there documentation available for adding to the editor sidebars and into the toolbar? The same for the block options in the sidebar as well.
@Soean Soean added the [Type] Question Questions about the design or development of the editor. label Jan 25, 2018
@melchoyce
Copy link
Contributor

For shortcodes that wrap around text (i.e. inline), what is the post-Gutenberg solution? A block isn’t suitable in this situation.

Been thinking a bit about inline tools — thinking the best solution is probably to put another item in the Quick Toolbar and have it work similarly to the Link button:

inline-toolbar

@dartiss
Copy link
Author

dartiss commented Jan 26, 2018

Yes, that sounds like a good solution. Is this something that's already possible Mel? If so, I'm guessing we just need the documentation to explain better how this can be done.

@melchoyce
Copy link
Contributor

I can't speak to the technical implementation — maybe @aduth or @youknowriad would know?

@aduth
Copy link
Member

aduth commented Jan 31, 2018

Beyond the formattingControls options that a block author can provide, I don't think we yet offer the option for block authors to implement their own formats or extend the default set of formats for existing core blocks. That said, this is something I think we could do without too much trouble by extending the FormatToolbar component, perhaps using hooks. Similarly, it would be nice to refactor our existing "custom" formats like link application toward this pattern.

@jasmussen
Copy link
Contributor

Noting that the mockups for inserting images inline (#2043) include the ability to insert other tokens, this could be shortcodes, but long term shortcodes are best ported to blocks, or used with the Classic Editor plugin, which can be used for as long as you like.

For that reason, going to close this ticket as answered, for now. Questions are also most welcome in the WordPress core slack, channel #core-editor, where we can look at additional solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Question Questions about the design or development of the editor.
Projects
None yet
Development

No branches or pull requests

5 participants