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

Remove the Image tool #1480

Open
ChristopherChudzicki opened this issue Sep 12, 2022 · 1 comment
Open

Remove the Image tool #1480

ChristopherChudzicki opened this issue Sep 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@ChristopherChudzicki
Copy link
Contributor

ChristopherChudzicki commented Sep 12, 2022

Steps to Reproduce

  1. Open any studio page for editing. For example, any page at https://ocw-studio-rc.odl.mit.edu/sites/wgs-s10-special-topics-in-women-gender-studies-seminar-latina-womens-voices-spring-2010/type/page/ Seems not to happen with direct links, so click on any page there.

Expected Behavior

No console errors

Actual Behavior

Console error

instrument.js:109 toolbarview-item-unavailable Objectname: "imageStyle:full"[[Prototype]]: Objectconstructor: ƒ 
ckeditor.js:5 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'destroy')
    at Ot._destructor (ckeditor.js:5:20995)
    at ckeditor.js:5:22255

Sentry error: https://sentry.io/organizations/mit-office-of-digital-learning/issues/3301091136/?project=5739976

@ChristopherChudzicki
Copy link
Contributor Author

ChristopherChudzicki commented Sep 12, 2022

tldr: we should either remove the image plugin all together, or at least update its config.

This error seems to be coming from our CKEditor config: This error seems to be eminating from

image: {
toolbar: ["imageStyle:full", "imageStyle:side", "|", "imageTextAlternative"]
},

The imageStyle stuff is for CKEditor's image plugin. The image toolbar is a mini-toolbar that provides options about styling the image. But... We do not actually use that plugin. (We load it, but we do not display the main toolbar that enables it.) Maybe we used to? I'm not sure.

Additionally, we are on CKEditor 30 (iirc) and imageStyle:full was removed in 29.

Related: ckeditor/ckeditor5#11090 (comment)

@ChristopherChudzicki ChristopherChudzicki added the bug Something isn't working label Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant