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

RichText "AllowedFormats" not working for links #23660

Closed
Ipstenu opened this issue Jul 2, 2020 · 5 comments
Closed

RichText "AllowedFormats" not working for links #23660

Ipstenu opened this issue Jul 2, 2020 · 5 comments
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable Needs Testing Needs further testing to be confirmed. [Package] Format library /packages/format-library [Type] Regression Related to a regression in the latest release

Comments

@Ipstenu
Copy link
Contributor

Ipstenu commented Jul 2, 2020

Describe the bug
When using a custom block that has allowedFormats={ [ 'core/bold', 'core/link', 'core/italic', 'core/strikethrough', 'core/text-color' ] } the one for core/link does not show up.

To reproduce

  1. Make a custom block using RichText
  2. Set allowed formats to include 'core/link'
  3. Add the block
  4. Check the toolbar -- no links

Expected behavior
Links should remain a functional item

Screenshots

Screen Shot 2020-07-02 at 1 53 10 PM

Editor version (please complete the following information):

  • WordPress version: 5.4.2
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Both
  • If the Gutenberg plugin is installed, which version is it? 8.4.0
@gziolo gziolo added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Package] Format library /packages/format-library Needs Testing Needs further testing to be confirmed. [Type] Regression Related to a regression in the latest release labels Jul 3, 2020
@ocean90
Copy link
Member

ocean90 commented Jul 6, 2020

@Ipstenu Do you have Yoast SEO active on the site? See the linked issue or Yoast/wordpress-seo#15617.

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Jul 6, 2020

Oh yeah that'd be it. That sucks. It broke my plugin and there's really no way for me to check "If you have Yoast SEO..." and call a different JS or anything :(

I can put in yoast-seo/link but now their plan is to take-over the link component and that sounds like it would really mess with people who have a plugin break on what appears to be a core component without an easy way to figure out where the code wasn't called from

@jdevalk
Copy link
Contributor

jdevalk commented Jul 7, 2020

@Ipstenu I completely agree. We've asked for the core component to be filterable several times and even submitted pull requests for that, those were denied so far. We want to fix this in a better way in core, so far the Gutenberg team doesn't allow us to.

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Jul 7, 2020

So perhaps this ticket should become "Make core/link and other components filterable so we don't kick the break can down the line" :)

@tellthemachines
Copy link
Contributor

Closing this issue as adding link extension capabilities is being tracked in #11599.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable Needs Testing Needs further testing to be confirmed. [Package] Format library /packages/format-library [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

No branches or pull requests

5 participants