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

Inline reusable block #19379

Open
strarsis opened this issue Jan 1, 2020 · 4 comments
Open

Inline reusable block #19379

strarsis opened this issue Jan 1, 2020 · 4 comments
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Package] Format library /packages/format-library [Type] Enhancement A suggestion for improvement.

Comments

@strarsis
Copy link
Contributor

strarsis commented Jan 1, 2020

Is your feature request related to a problem? Please describe.
Sometimes only a piece of text should be reused in Gutenberg,
or some inline content, e.g. text with inline images.
With the current reusable Gutenberg block this isn't possible,
as they work only with whole blocks.

Describe the solution you'd like

  • Extend Gutenberg reusable blocks to have a block/inline mode
  • Extend base block to have block/inline mode
  • Add extra inline Gutenberg reusable block collection

Describe alternatives you've considered
Currently I use a Reusable Text Blocks plugin and shortcodes for reusing text.
But the new Gutenberg editor is an opportunity to get rid of all other workarounds like shortcodes.

@youknowriad
Copy link
Contributor

Hi There!

Gutenberg already support custom inline formats which can be used as a replacement for inline shortcodes.

@strarsis
Copy link
Contributor Author

@youknowriad: So let's say I want to re-use a piece of text 10 times on 10 different pages. How can I create a reusable Gutenberg block for this piece of text and then place that reusable block inline into a e.g. paragraph? I don't think this is possible.

@youknowriad
Copy link
Contributor

Yes, that's not possible currently. One could use the Format API to store these inline fragments in a custom CPT or something but it's quite a bit of work and if it were to be implemented in Gutenberg, it will probably be done the same way.

@youknowriad youknowriad added [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Package] Format library /packages/format-library labels Jan 14, 2020
@noisysocks noisysocks added the [Type] Enhancement A suggestion for improvement. label Apr 21, 2020
@tomaswallentinus
Copy link

The reusable block is awesome, I used a plugin for that before, but to use it inside a p or li would be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Package] Format library /packages/format-library [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants