Skip to content
Snippets Groups Projects
Commit 79b57a95 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2093077 by Wim Leers: Fixed target attribute is set to '0' when...

Issue #2093077 by Wim Leers: Fixed target attribute is set to '0' when creating a link without checking the 'Open in new window' checkbox.
parent 7b5109dd
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -58,6 +58,11 @@ CKEDITOR.plugins.add('drupallink', { ...@@ -58,6 +58,11 @@ CKEDITOR.plugins.add('drupallink', {
range.selectNodeContents(text); range.selectNodeContents(text);
} }
// Ignore a disabled target attribute.
if (returnValues.attributes.target === 0) {
delete returnValues.attributes.target;
}
// Create the new link by applying a style to the new text. // Create the new link by applying a style to the new text.
var style = new CKEDITOR.style({ element: 'a', attributes: returnValues.attributes }); var style = new CKEDITOR.style({ element: 'a', attributes: returnValues.attributes });
style.type = CKEDITOR.STYLE_INLINE; style.type = CKEDITOR.STYLE_INLINE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment