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

Standard shortcodes do not render assets in the editor. #1205

Open
tdrayson opened this issue Feb 24, 2025 · 0 comments
Open

Standard shortcodes do not render assets in the editor. #1205

tdrayson opened this issue Feb 24, 2025 · 0 comments

Comments

@tdrayson
Copy link

When you create a shortcode and enqueue an asset using the native WordPress wp_enqueue_style, you would assume that the styles would also be enqueued in the editor.

This however is not the case.

How to reproduce:

  1. Install test plugin
  2. Add a new shortcode to any breakdance page [tct_test_plugin]
  3. View the frontend, see Hello World in red
  4. View the editor preview, see no styles applied to shortcode Hello World text

Questions:

  1. Is there a required way that shortcodes are supposed to be written to ensure styles are rendered in the editor.
  2. If the above answer is yes, then why is this the case? You are making it unnecessarily difficult for plugin developers, requiring them to do something different for your singular plugin?

Editor

Image

Frontend

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant