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

Closes #3217: Add anchor link plugin for CKEditor5. #3219

Merged
merged 26 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a87a0e2
Closes #3217: Add anchor link plugin for CKEditor5.
joeparsons Feb 27, 2024
f88bfc7
Update az_paragraphs.install
joeparsons Feb 27, 2024
83a2fec
Update az_paragraphs.install
joeparsons Feb 27, 2024
444d41a
Update az_paragraphs.info.yml
joeparsons Feb 27, 2024
dcbdb57
Update az_paragraphs.module
joeparsons Feb 27, 2024
d30f2fa
Update az_paragraphs.module
joeparsons Feb 27, 2024
7721af3
Update editor.editor.az_standard.yml
joeparsons Feb 27, 2024
2ed482e
Update az_paragraphs.install
joeparsons Feb 27, 2024
fd7b244
Update modules/custom/az_paragraphs/az_paragraphs.module
joeparsons Feb 28, 2024
5aeef51
Merge branch 'main' into issue/3217
joeparsons Feb 28, 2024
7a84118
Merge branch 'main' into issue/3217
joeparsons Jun 26, 2024
906bec8
Update modules/custom/az_paragraphs/az_paragraphs.module
joeparsons Jun 26, 2024
9eee05e
Update modules/custom/az_paragraphs/az_paragraphs.module
trackleft Jun 26, 2024
647d226
Merge branch 'main' into issue/3217
trackleft Aug 6, 2024
72fd7f4
New version
joeparsons Aug 28, 2024
fcf9d02
Merge branch 'main' into issue/3217
joeparsons Oct 18, 2024
136adf4
Add CSS library to override anchor link button icon.
joeparsons Oct 22, 2024
7fd9743
Use hook_ckeditor5_plugin_info_alter() to change icon.
joeparsons Oct 22, 2024
6e061ed
Properly alter ckeditor5 plugin info.
joeparsons Oct 22, 2024
a7c43ff
Fix ckeditor plugin info alter more.
joeparsons Oct 22, 2024
0617d23
Update az_paragraphs.module
joeparsons Oct 22, 2024
dd37812
Fix library reference.
joeparsons Oct 22, 2024
acdaba2
Fix library names.
joeparsons Oct 22, 2024
8e59d6d
Fix DB update name and fix inline SVG
joeparsons Oct 22, 2024
77408b1
Remove icon overrides
joeparsons Oct 23, 2024
727b539
Apply suggestions from code review
joeparsons Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"citation-style-language/styles": "0.0.474",
"composer/installers": "^2.0",
"cweagans/composer-patches": "^1.7",
"drupal/anchor_link": "3.0.0-beta1",
"drupal/access_unpublished": "1.6.0",
"drupal/antibot": "2.0.4",
"drupal/asset_injector": "2.21.0",
Expand Down Expand Up @@ -124,6 +125,7 @@
"npm-asset/bootstrap-datepicker": "1.10.0",
"npm-asset/easepick--bundle": "1.2.1",
"npm-asset/jquery-ui-touch-punch": "*",
"npm-asset/northernco--ckeditor5-anchor-drupal": "0.5.0",
"npm-asset/slick-carousel": "1.8.0",
"renanbr/bibtex-parser": "2.2.0",
"seboettg/citeproc-php": "2.6.2"
Expand Down
1 change: 1 addition & 0 deletions modules/custom/az_paragraphs/az_paragraphs.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ core_version_requirement: ^9 || ^10
package: 'The University of Arizona'
dependencies:
- paragraphs:paragraphs
- anchor_link:anchor_link
- az_card
- az_core
- az_media
Expand Down
7 changes: 7 additions & 0 deletions modules/custom/az_paragraphs/az_paragraphs.install
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,10 @@ function az_paragraphs_update_920601(&$sandbox) {
function az_paragraphs_update_1021001() {
\Drupal::service('module_installer')->install(['ckeditor_indentblock']);
}

/**
* Enable anchor_link module for CKEditor5 by default.
*/
function az_paragraphs_update_1021201() {
\Drupal::service('module_installer')->install(['anchor_link']);
}
18 changes: 18 additions & 0 deletions modules/custom/az_paragraphs/az_paragraphs.module
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,21 @@ function az_paragraphs_theme_registry_alter(&$theme_registry) {
}
}
}

/**
* Implements hook_library_info_alter().
*
* Alter path of CKE5 anchor link library to match the one installed by
* composer.
* @link https://www.drupal.org/project/anchor_link/issues/3406349#comment-15463373
*/
function az_paragraphs_library_info_alter(&$libraries, $extension) {
if ($extension === 'anchor_link' && isset($libraries['cke5_anchor_link'])) {
$libraries['cke5_anchor_link']['js'] = [
'/libraries/northernco--ckeditor5-anchor-drupal/build/anchor-drupal.js' => [
'preprocess' => FALSE,
'minified' => TRUE,
],
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ settings:
- specialCharacters
- '|'
- link
- anchor
- '|'
- bulletedList
- numberedList
Expand Down