Problem/Motivation
While using the linkit module and add target attribute. When we deselect the checkbox of "Open in new window". The CKEditor has not removed the target="_blank" attribute from the source code.
Steps
Following are the steps to follow to reproduce the bug,
1) Install and enable linkit module (8.x-4.3 version)
2) Add all the configuration. Add Target attribute from Manage Attribute tab.
3) Configure linkit in Text formats and editors (config/content/formats)
4) Add content and add link from select linkit option in CKEditor to given the link with checkbox of "Open in new window". Check the source code of CKEditor.
5) Update link from linkit option in CKEditor and deselect the checkbox of "Open in new window". Check source code of CKEditor.
6) See here, in source code of CKEditor, <p><a href="link" target="_blank">test</a></p>
target attribute not be removed.
The response I got in ajax from Linkit module is working fine.
[{"command":"update_build_id","old":"form-l6OjCf7fckIlGn0MpaIdnIDB_N9jXbvW7XGOqhqrA38","new":"form-oi3OYG-UoUkZnHJKjlV0hqguG3T1jgC0TN3my_SzVDQ"},{"command":"editorDialogSave","values":{"attributes":{"href":"#"},"actions":{"save_modal":"Speichern"},"form_build_id":"form-oi3OYG-UoUkZnHJKjlV0hqguG3T1jgC0TN3my_SzVDQ","form_token":"pjof9If17pb4BJbhX7Haj8DcWJk8g9PbU_2sAqYglDU","form_id":"editor_link_dialog","op":"Speichern"}},{"command":"closeDialog","selector":"#drupal-modal","persist":false}]
Proposed resolution
When I deselect the checkbox, CKEditor should be removed target attribute from the source code as well.
Comments
Comment #2
latikas CreditAttribution: latikas commentedComment #3
Wim LeersComment #4
anonComment #5
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedThe same problem.
Comment #6
latikas CreditAttribution: latikas commentedYes, my mistake. Please mark one of them as a duplicate issue or remove it. Thanks.
Comment #7
lindsay.wils CreditAttribution: lindsay.wils commentedI have the same issue, is there a solution as yet? thanks.
Comment #8
idebr CreditAttribution: idebr at ezCompany commentedAn earlier issue is available at #2912517: Issue with removing attributes from the link. I'll close this issue as a duplicate, so we can focus our efforts in the related issue.