Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/helpers/CkeditorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public static function advanceLinkOptions(): array
'value' => 'download',
'conversion' => [
'type' => 'bool',
'value' => 'download',
'value' => true,
'model' => 'craftDownload',
'view' => 'download',
],
Expand Down
4 changes: 3 additions & 1 deletion src/web/assets/ckeditor/dist/ckeditor5-craftcms.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/web/assets/ckeditor/src/link/linkediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ export default class CraftLinkEditing extends Plugin {
if (extraAttributeValues[item.model]) {
writer.setAttribute(
item.model,
extraAttributeValues[item.model],
// for bool type options, if the value is set to true, set the attribute with empty value
// see https://github.com/craftcms/ckeditor/issues/551 for more info
item.type == 'bool' && item.value == true
? ''
: extraAttributeValues[item.model],
writer.createRangeOn(node),
);
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/web/assets/ckeditor/src/link/linkui.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,11 @@ export default class CraftLinkUI extends Plugin {
.bind('isOn')
.to(linkCommand, attributeModel, (commandValue) => {
if (commandValue === undefined) {
// set the initial toggle value to off after the page reload
// set the initial toggle value to "off" after the page reload
formView[attributeModel].element.value = '';
return false;
} else {
// set the initial toggle value to on after the page reload
// set the initial toggle value to "on" after the page reload
formView[attributeModel].element.value =
advancedField.conversion.value;
return true;
Expand Down
Loading