- πΊπΈUnited States angrytoast Princeton, NJ
Adding a patch for this bug that looks to work for both
1.4.0
and2.0.0-alpha1
as of 2023-07-05.It adds a general
setup.js
that callsace.config.set('basePath')
to make sure it has the value of the discovered library path from the module. - Status changed to Needs review
over 1 year ago 6:00am 5 July 2023 - πΊπΈUnited States angrytoast Princeton, NJ
A quick update to the previous patch in #3. Currently
ace_editor_lib_path
doesn't cache its discovered library path so it must run through the filesystem each time it is run. Because the patch adds ahook_page_attachments
implementation to populatedrupalSettings
, it's helpful to cache the path for future use.A better solution would be to introduce a service that can be used in both procedural code and the various plugins this module provides but that seems like a bigger refactor that should be tackled separately.
- πΊπΈUnited States angrytoast Princeton, NJ
Following up again, here's a slightly different approach that limits the
drupalSettings
addition by not usinghook_page_attachments
. Instead it adds them in the respective plugin files so that it's only added when needed, which feels better.That said, we only use the filter functionality. I can confirm it works there, but can't confirm for the AceFormatter use case. I'm also not familiar with editor plugins so the
base_path
isn't added there todrupalSettings
and will need more work. - Status changed to Needs work
5 months ago 3:17pm 19 June 2024 - First commit to issue fork.
- Merge request !14Add support for JS aggregation by including basePath to library. β (Open) created by klaasvw
- π§πͺBelgium klaasvw
I've pushed a MR again 2.0.x containing the changes from #5.
This version will only add the setting if one of the ace_editor libraries is loaded.
Also note that not only the Ace basePath is set but also the theme-, worker- and modePath.