roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Fix TinyMCE-Related Console Warnings

Open aaronskiba opened this issue 1 year ago • 1 comments

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
      • The [forced_root_block](https://www.tiny.cloud/docs/tinymce/5/content-filtering/#forced_root_block) option will no-longer accept the false value or an empty string value in TinyMCE 6.0 https://www.tiny.cloud/docs/tinymce/5/6.0-upcoming-changes/
      • Removing this code resolves the console warning, and it doesn't seem to introduce any other changes (documented here: https://github.com/DMPRoadmap/roadmap/issues/3424#issuecomment-2166424160)
    2. Removed "Resize any TinyMCE editors" code from app/javascript/src/utils/conditionalFields.js
      • This code block was attempting to set the height using tinymceEditor.settings.autoresize_min_height. However, tinymceEditor.settings. was evaluating to undefined. In addition, TinyMCE replaced autoresize_min_height with min_height when it upgraded from v4 to v5 (https://www.tiny.cloud/blog/how-to-migrate-from-tinymce-4-to-tinymce-5/).
      • This code block didn't appear to be affecting anything. Rather, it was being set by the value of min_height:, within the the defaultOptions object of app/javascript/src/utils/tinymce.js (documented here: https://github.com/DMPRoadmap/roadmap/issues/3424#issuecomment-2166552337).

aaronskiba avatar Jun 13 '24 19:06 aaronskiba

</tr>
1 Error
:no_entry_sign:

Please include a CHANGELOG entry.

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

Generated by :no_entry_sign: Danger

github-actions[bot] avatar Jun 13 '24 19:06 github-actions[bot]