Skip to content

Commit

Permalink
3.7.1 - fixed a JS error
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 2, 2024
1 parent 39fef72 commit 5eef932
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for CKEditor for Craft CMS

## 3.7.1 - 2024-02-01

- Fixed a JavaScript error.

## 3.7.0 - 2024-02-01

- Link element selector modals now include custom sources. ([#139](https://github.com/craftcms/ckeditor/issues/139))
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/dist/ckeditor5-craftcms.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/ckeditor/dist/ckeditor5-craftcms.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import {Plugin, icons} from 'ckeditor5/src/core';
import {
DropdownButtonView,
Model,
ViewModel,
createDropdown,
addListToDropdown,
} from 'ckeditor5/src/ui';
Expand Down Expand Up @@ -121,7 +121,7 @@ export default class ImageTransformUI extends Plugin {
options.map((option) => {
const definition = {
type: 'button',
model: new Model({
model: new ViewModel({
commandName: 'transformImage',
commandValue: option.value,
label: this._getOptionLabelValue(option),
Expand Down
10 changes: 5 additions & 5 deletions src/web/assets/ckeditor/src/link/linkui.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import {Plugin} from 'ckeditor5/src/core';
import {Collection} from 'ckeditor5/src/utils';
import {
Model,
ViewModel,
ContextualBalloon,
SplitButtonView,
createDropdown,
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class CraftLinkUI extends Plugin {
for (const option of linkOptions) {
itemDefinitions.add({
type: 'button',
model: new Model({
model: new ViewModel({
label: option.label,
linkOption: option,
withText: true,
Expand All @@ -105,7 +105,7 @@ export default class CraftLinkUI extends Plugin {

itemDefinitions.add({
type: 'button',
model: new Model({
model: new ViewModel({
label: Craft.t('ckeditor', 'Insert link'),
withText: true,
}),
Expand Down Expand Up @@ -218,15 +218,15 @@ export default class CraftLinkUI extends Plugin {
this.siteDropdownItemModels = Object.fromEntries(
Craft.sites.map((site) => [
site.id,
new Model({
new ViewModel({
label: site.name,
siteId: site.id,
withText: true,
}),
]),
);

this.siteDropdownItemModels.current = new Model({
this.siteDropdownItemModels.current = new ViewModel({
label: Craft.t('ckeditor', 'Link to the current site'),
siteId: null,
withText: true,
Expand Down

0 comments on commit 5eef932

Please sign in to comment.