Problem/Motivation
Currently CKEditor plugin have to be placed in a root libraries folder (/libraries).
This can be quite inconvenient in case of profile developing, when the access to docroot is restricted.
Proposed resolution
Use Libraries to locate the plugin.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | fakeobjects-use_libraries_to_locate_plugin-2875374-9.patch | 2.62 KB | spheresh |
| #3 | interdiff-2-3.txt | 237 bytes | l0ke |
| #3 | fakeobjects-use_libraries_to_locate_plugin-2875374-3.patch | 2.8 KB | l0ke |
| #2 | use_libraries_to_locate_plugin-2875374-2.patch | 2.79 KB | l0ke |
Issue fork fakeobjects-2875374
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
l0keComment #3
l0keNitpick fixed: The PHP open tag must be followed with exactly one blank line.
Comment #4
gavin.hughes commentedTested this using Drupal 8.5.3 picks the plugin up nicely
Comment #5
mrP commented+1 RTBC with Drupal 8.8.1
Comment #6
bkosborneWhat happens if libraries module is enabled but there is no library "registered" for 'fakeobjects'? what does this return? Maybe I misunderstand libraries module.
The default path here for the JS file is incorrect
Comment #7
bkosborneNeeds to check if libraries API is available. Module may not be enabled.
Comment #8
WebbehCKEditor Font Size & Family attempted a solution similar to #6, but it ended up doing exactly what you think it might: it crashes if Libraries can't locate the library (see #3122403: The library definition for the library 'font' could not be found. in Drupal\libraries\ExternalLibrary\Definition\FileDefinitionDiscoveryBase->getDefinition() and its eventual removal).
The linked issue has a bit of research into possible solutions, although I couldn't find a best-practice for wrestling Libraries + checking to see if the library exists.
Comment #9
spheresh commentedrebasing the patch #3 to apply to the latest dev
Comment #10
anybodyThanks, please proceed with MR's here!
Comment #13
zaryab_drupal commentedCreated MR for patch in #9
Comment #14
xmacinfoI think we can add the dependencies through Composer.