Commit 79b57a95 authored by webchick's avatar webchick

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
...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment