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

Live preview is not triggered when using panel features #172

Closed
debSource opened this issue Feb 21, 2024 · 4 comments
Closed

Live preview is not triggered when using panel features #172

debSource opened this issue Feb 21, 2024 · 4 comments
Assignees
Labels

Comments

@debSource
Copy link

Description

The live preview is not triggered when using features belonging to the panel. This are features such as:

  • Format
  • Styles
  • Bold
  • Italic
  • Lists
  • etc ...

Steps to reproduce

  1. Edit your text inside the CKEditor Field
  2. Add some panel features to the selected text such as bold, itelic, etc or add an image/list to the field

Additional info

Adding images withing the CKEditor field does not trigger the reload of the live preview
Adding lists withing the CKEditor field does not trigger the reload of the live preview

  • Craft version: 4.7.3
  • PHP version: 8.1.7
  • Database driver & version: MySQL 8.0.32
  • Plugins & versions: CKEditor 3.7.3
@debSource debSource added the bug label Feb 21, 2024
@debSource
Copy link
Author

Plugin has been updated today to version 3.8.0. The bug still persists.
Screenshot 2024-02-22 133136
None of the panel features triggers a reload of the preview mode.

@i-just
Copy link
Contributor

i-just commented Feb 22, 2024

Hi, thanks for reaching out.

This happens because in Live Preview and when deciding whether to trigger the form’s autosave, in general, we listen to specific events and clicking on a button in the CKEditor field doesn’t trigger any of those events. If you were to click a Bold button and then, e.g. press an arrow key to move the cursor, or if you type anything in the field, the autosave will be triggered, and the preview will also get updated.

I just raised a PR to improve this.

@debSource
Copy link
Author

Thank you so much for the quick reply and being willing to improve it :) That's awesome!

@brandonkelly
Copy link
Member

This ended up being a Craft bug. Fixed in Craft 5.0.0-beta.7.

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

No branches or pull requests

3 participants