Last active
December 5, 2023 15:09
-
-
Save junaidpv/9812d3f5ed9ab42772597cc05a474d01 to your computer and use it in GitHub Desktop.
Patch for Drupal CKeditor contrib module 1.0.2. Make drupal link ckeditor plugin not to act on links added with anchor link plugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/js/plugins/drupallink/plugin.js b/js/plugins/drupallink/plugin.js | |
| index b06b276757..c6e0fa676e 100644 | |
| --- a/js/plugins/drupallink/plugin.js | |
| +++ b/js/plugins/drupallink/plugin.js | |
| @@ -208,6 +208,9 @@ | |
| if (!element.isReadOnly()) { | |
| if (element.is('a')) { | |
| + if (!element.hasAttribute( 'data-entity-type' )) { | |
| + return; | |
| + } | |
| editor.getSelection().selectElement(element); | |
| editor.getCommand('drupallink').exec(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment