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

Fix TinyMCE-Related Console Warnings #3425

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

aaronskiba
Copy link
Contributor

Fixes #3424

Changes proposed in this PR:

  • Other than preventing specific console warnings from appearing, these changes should not affect the behaviour of the app.
    1. Removed forced_root_block: '' from app/javascript/src/superAdmin/notifications/edit.js
    2. Removed "Resize any TinyMCE editors" code from app/javascript/src/utils/conditionalFields.js

Prior to this change, `Invalid value passed for the forced_root_block option. Must be a non-empty string.` would be rendered as a console warning.

- This commit removes the console warning, but it shouldn't have an effect on the app's behaviour. Even when `forced_root_block: ''` existed, the entries would be saved with <p></p> tags surrounding them. (Documented here: #3424 (comment) )
Prior to this change,`tinymceEditor.settings` was evaluating to `undefined`. Also, TinyMCE replaced `autoresize_min_height` replaced with `min_height` with the release of v5.
We have `min_height` included in our defaultOptions object within `app/javascript/src/utils/tinymce.js`. The value of `min_height` appears to be performing the functionality that this removed code was attempting to.

This change is more comprehensively documented here: #3424 (comment)
Copy link

</tr>
1 Error
🚫

Please include a CHANGELOG entry.

You can find it at [CHANGELOG.md](https://github.com/DMPRoadmap/roadmap/blob/main/CHANGELOG.md).

Generated by 🚫 Danger

@aaronskiba aaronskiba closed this Aug 7, 2024
@aaronskiba aaronskiba reopened this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant