-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
WIP: Rich Text Emails #33779
WIP: Rich Text Emails #33779
Conversation
'jquery', | ||
'underscore', | ||
'knockout', | ||
'ckeditor5/build/ckeditor5-dll', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is that requirejs (hqDefine
) does not know where to find this library. Does this need to be added to thirdPartyGlobals
as outlined in the RequireJS Migration Guide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @millerdev - thank you this was very helpful!
The issue was that I hadn't defined the correct shims in the requirejs_config
files.
You can see in the commit I just pushed: 17fd853 how this works now.
However, in the CKEditor5 build from npm, they define every single feature as a (very granular) plugin: https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/alternative-setups/dll-builds.html#using-a-dll-build
To allow for every feature that is required to make this useful for the thing I'm building, I think I'll have to add about 50 new shims to this list. If you and @orangejenny still think this is preferable to directly including the build that I was able to use in the codebase, I'm happy to go this route. However, it does seem to be quite a bit more work, and adds a lot of boilerplate in the codebase that doesn't necessarily need to be there.
I'd love to hear your thoughts here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof, 50 is a lot, and I'm guessing that identifying the exact features might be a task in and of itself. But I do lean towards adding the many, many shims. My main concern is that adding ckeditor directly to the codebase means we can't take advantage of tools to notify us of new versions and, more importantly, any CVEs identified.
I defer to Daniel if he disagrees, as he's more involved in dependency management than I am.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback, @orangejenny ! Sounds good. I have a good list of the features (as outlined in the spec doc), and I'll proceed with adding these through npm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Jenny on the reasons to use shims, making that preferable to direct include.
17fd853
to
9a3207b
Compare
Note: Not for merging!
This PR is to show what I'm doing to try to get ckeditor to be included after installation with
yarn
.When loading this in the browser, I get:
Steps to reproduce:
Other things I've tried:
hqwebapp/js/bootstrap5/requirejs_config.js