Skip to content
Snippets Groups Projects
Commit 206eb2ce authored by jurgenhaas's avatar jurgenhaas
Browse files

Add patch to linkit for 10.3

parent c2177031
No related branches found
No related tags found
1 merge request!183Merging develop into main
Pipeline #1209268 passed with warnings
......@@ -168,7 +168,8 @@
"#3313343 Disable cron": "https://www.drupal.org/files/issues/2022-10-03/support_disabling_cron-3313343-2.patch"
},
"drupal/linkit": {
"#3022261 Support anchors": "https://www.drupal.org/files/issues/2024-03-17/3022261-41.patch"
"#3022261 Support anchors": "https://www.drupal.org/files/issues/2024-03-17/3022261-41.patch",
"#3442127 Deprecate Drupal.EditorFeature": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3442127.diff"
},
"drupal/menu_block": {
"#3082445 Add option to always render parent menu item": "https://www.drupal.org/files/issues/2020-10-12/menu_block-render-parent-3082445-26.patch"
......
diff --git a/js/linkit.filter_html.admin.js b/js/linkit.filter_html.admin.js
deleted file mode 100644
index 8295286fa87320b623a6624739e2b1b518efddf6..0000000000000000000000000000000000000000
--- a/js/linkit.filter_html.admin.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file
- * Send events to add or remove a tags to the filter_html allowed tags.
- */
-
-(function ($, Drupal, document, once) {
-
- 'use strict';
-
- /**
- * When enabling the linkit filter, also add linkit rules to filter_html.
- *
- * @type {Drupal~behavior}
- *
- * @prop {Drupal~behaviorAttach} attach
- * Attaches linkitFilterHtml behavior.
- */
- Drupal.behaviors.linkitFilterHtml = {
- attach: function (context) {
- var selector = '[data-drupal-selector="edit-filters-linkit-status"]';
- var feature = editorFeature();
-
- once('filters-linkit-status', selector, context)
- .forEach((checkbox) => {
- const $checkbox = $(checkbox);
- $checkbox.on('click', function () {
- var eventName = $(this).is(':checked') ? 'drupalEditorFeatureAdded' : 'drupalEditorFeatureRemoved';
- $(document).trigger(eventName, feature);
- });
- });
- }
- };
-
- /**
- * Returns a editor feature.
- *
- * @return {Drupal.EditorFeature}
- * A editor feature with linkit specific tags and attributes.
- */
- function editorFeature() {
- var linkitFeature = new Drupal.EditorFeature('linkit');
- var rule = new Drupal.EditorFeatureHTMLRule();
- // Tags.
- rule.required.tags = ['a'];
- rule.allowed.tags = ['a'];
- // Attributes.
- rule.required.attributes = ['data-entity-substitution', 'data-entity-type', 'data-entity-uuid', 'title'];
- rule.allowed.attributes = ['data-entity-substitution', 'data-entity-type', 'data-entity-uuid', 'title'];
-
- linkitFeature.addHTMLRule(rule);
- return linkitFeature;
- }
-
-})(jQuery, Drupal, document, once);
diff --git a/linkit.libraries.yml b/linkit.libraries.yml
index bb04aedbdebad1b16dfc1159190afdc1ca6bf728..963c0222c530b2804113febe0a7971c6bea3598b 100644
--- a/linkit.libraries.yml
+++ b/linkit.libraries.yml
@@ -26,15 +26,6 @@ linkit.autocomplete:
- core/drupal.autocomplete
- core/once
-linkit.filter_html.admin:
- version: VERSION
- js:
- js/linkit.filter_html.admin.js: {}
- dependencies:
- - core/jquery
- - core/drupal
- - core/once
-
ckeditor5:
version: VERSION
js:
diff --git a/src/Plugin/Filter/LinkitFilter.php b/src/Plugin/Filter/LinkitFilter.php
index 8dfd2063a8c7ab32dc198682e837fc8eb1937f09..6bc75bb2f28c043412b595608036a1cc7e5ff323 100644
--- a/src/Plugin/Filter/LinkitFilter.php
+++ b/src/Plugin/Filter/LinkitFilter.php
@@ -193,9 +193,6 @@ class LinkitFilter extends FilterBase implements ContainerFactoryPluginInterface
'#type' => 'checkbox',
'#title' => $this->t('Automatically set the <code>title</code> attribute to that of the (translated) referenced content'),
'#default_value' => $this->settings['title'],
- '#attached' => [
- 'library' => ['linkit/linkit.filter_html.admin'],
- ],
];
return $form;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment