Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ckeditor-dev to 4.18.0 #196

Merged
merged 4 commits into from
Apr 13, 2022
Merged
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ A prompt will appear asking you which version you'd like to select. This will up

**NOTE:** In order to prevent unintended commits to the submodule, using `ck.sh update` is the only supported way to change the commit the submodule is referencing. Git is configured to ignore changes to the submodule, so you will only see them in the output of commands like `git status`, `git show`, `git log -p` (etc) if you pass the `--ignore-submodules=none` switch.

#### Resolving problems while updating CKEditor's base version

> `./ck.sh update` should only be used to check that everything is in order before applying changes, and we cannot expect it to be used to resolve conflicts.

You may encounter some issues throughout the upgrade process. You can take the following actions to properly resolve these conflicts:

1. Navigate to the `ckeditor-dev/` subdirectory and manually resolve conflicts by rebasing with the proper tag/version you want to upgrade. `git pull —rebase 4.18.0`, for example, can be used to rebase with 4.18.0.
2. Go to `liferay-ckeditor/` and run `./ck.sh update` after the submodule has been successfully updated. Choose the correct version of ckeditor you're trying to update, then check to see if everything under `ckeditor-dev` is fine and without conflicts.
3. If everything looks good and there are no conflicts, run `./ck.sh patch` to update the `patches/` folder, and don't forget to leave a good commit message. `chore: update patches for upgrading to CKEditor 4.18.0` is an example of a decent commit message for this type of change.

### Testing in [liferay-portal](https://github.com/liferay/liferay-portal)

To test your local CKEditor build in liferay-portal:
Expand Down
1 change: 0 additions & 1 deletion ck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ case "$COMMAND" in
echo

downloadPlugin scayt "$VERSION" plugins/scayt
downloadPlugin wsc "$VERSION" plugins/wsc

# Copy lang files from image plugin to imagespacingbox
cp -r plugins/image/lang plugins/imagespacingbox
Expand Down
2 changes: 1 addition & 1 deletion ckeditor-dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From c85038dd137fd93cc6fe23e2fde1ab8b5fe9f6bf Mon Sep 17 00:00:00 2001
From e3d0dc6dea9b1a413f7c70ea5fd66e6c6d03e278 Mon Sep 17 00:00:00 2001
From: Julien Castelain <[email protected]>
Date: Tue, 14 May 2019 10:47:25 +0200
Subject: [PATCH] LPS-89596 Cannot Drag Image from top content line in IE11
Expand All @@ -10,7 +10,7 @@ Changed position of drag icon for IE.
1 file changed, 4 insertions(+)

diff --git a/plugins/widget/plugin.js b/plugins/widget/plugin.js
index 5eb6d93512..65e0700bd0 100644
index b01103ad9d..ce79e10f58 100644
--- a/plugins/widget/plugin.js
+++ b/plugins/widget/plugin.js
@@ -1607,6 +1607,10 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From be6d62539e74d9af7c61bb5d920f724dbe466697 Mon Sep 17 00:00:00 2001
From bc03b720b4431b11776cdf34d4a70922eb90a56a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20P=C3=A1kai?= <[email protected]>
Date: Tue, 21 May 2019 09:38:15 +0200
Subject: [PATCH] LPS-95472 Tabs in popups not appears correctly in maximized
Expand All @@ -11,7 +11,7 @@ plugin.
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/dialog/plugin.js b/plugins/dialog/plugin.js
index 71bb960ac4..d3a420e6a2 100644
index d088f6dfb0..a1fdc81ff1 100644
--- a/plugins/dialog/plugin.js
+++ b/plugins/dialog/plugin.js
@@ -1185,7 +1185,7 @@ CKEDITOR.DIALOG_STATE_BUSY = 2;
Expand Down
6 changes: 3 additions & 3 deletions patches/0003-LPS-85326-Remove-check-for-Webkit-browsers.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 6c84d34bb174b7d95333441683fdb167fe3bbf05 Mon Sep 17 00:00:00 2001
From 0f08683be8d31119ea25fb2a753f606379cddd6e Mon Sep 17 00:00:00 2001
From: Julien Castelain <[email protected]>
Date: Wed, 25 Mar 2020 12:58:15 +0100
Subject: [PATCH] LPS-85326 Remove check for Webkit browsers
Expand All @@ -18,10 +18,10 @@ https://github.com/liferay/liferay-ckeditor/commit/328017c65063ac18119e244fec92d
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/selection.js b/core/selection.js
index 72a02ef9f0..4da7aff707 100644
index 2137aae60f..62e1566d0d 100644
--- a/core/selection.js
+++ b/core/selection.js
@@ -2278,7 +2278,7 @@
@@ -2279,7 +2279,7 @@

var nativeRange = this.document.$.createRange();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 6e3decda24dacdf9779c7bafa4ba5ad3cf4dd13a Mon Sep 17 00:00:00 2001
From 1cdc7c74572905d5bc34834db30c0498680a8876 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20P=C3=A1kai?= <[email protected]>
Date: Tue, 14 Apr 2020 10:15:56 +0200
Subject: [PATCH] LPP-36989 Remove obsolete summary field from table elements
Expand All @@ -15,7 +15,7 @@ Subject: [PATCH] LPP-36989 Remove obsolete summary field from table elements
8 files changed, 38 insertions(+), 56 deletions(-)

diff --git a/plugins/table/dialogs/table.js b/plugins/table/dialogs/table.js
index 5c42bc5c07..b19c2515df 100755
index 6fa1c0d49c..983b1706d6 100755
--- a/plugins/table/dialogs/table.js
+++ b/plugins/table/dialogs/table.js
@@ -523,22 +523,6 @@
Expand All @@ -42,7 +42,7 @@ index 5c42bc5c07..b19c2515df 100755
} ]
},
diff --git a/plugins/table/plugin.js b/plugins/table/plugin.js
index ec3b769ba4..43ef13d931 100755
index 0f6567f2fe..2717ae0649 100755
--- a/plugins/table/plugin.js
+++ b/plugins/table/plugin.js
@@ -18,7 +18,7 @@ CKEDITOR.plugins.add( 'table', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From 3abfc87bf93ee2e6f4421f2d7fc1ec9e832217f6 Mon Sep 17 00:00:00 2001
From 8b4da009a9cf77a7fdaa16e7e09b67f5640a52c3 Mon Sep 17 00:00:00 2001
From: Julien Castelain <[email protected]>
Date: Tue, 7 Jul 2020 09:47:27 +0200
Subject: [PATCH] LPS-112982 Add additional resource URL parameters

---
core/ckeditor_base.js | 25 ++++++++++++++++++-------
core/ckeditor_base.js | 23 ++++++++++++++++++-----
core/config.js | 9 +++++++++
2 files changed, 27 insertions(+), 7 deletions(-)
2 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/core/ckeditor_base.js b/core/ckeditor_base.js
index dcd1b6bfa3..8285e83c64 100644
index dbec536bd0..68c2371c7f 100644
--- a/core/ckeditor_base.js
+++ b/core/ckeditor_base.js
@@ -170,15 +170,26 @@ if ( !window.CKEDITOR ) {
@@ -175,13 +175,26 @@ if ( !window.CKEDITOR ) {
* @returns {String} The full URL.
*/
getUrl: function( resource ) {
Expand All @@ -23,9 +23,7 @@ index dcd1b6bfa3..8285e83c64 100644
+ ? new URL(resource)
+ : new URL(this.basePath + resource);

- // Add the timestamp, except for directories.
- if ( this.timestamp && resource.charAt( resource.length - 1 ) != '/' && !( /[&?]t=/ ).test( resource ) )
- resource += ( resource.indexOf( '?' ) >= 0 ? '&' : '?' ) + 't=' + this.timestamp;
- resource = this.appendTimestamp( resource );
+ if (!resourceUrl.toString().endsWith('/')) {
+ if (this.timestamp && !resourceUrl.searchParams.has('t')) {
+ resourceUrl.searchParams.set('t', this.timestamp);
Expand All @@ -47,7 +45,7 @@ index dcd1b6bfa3..8285e83c64 100644

/**
diff --git a/core/config.js b/core/config.js
index 1ebc053555..4d7013209a 100644
index 15f1b7c0de..2c4f2f74bc 100644
--- a/core/config.js
+++ b/core/config.js
@@ -8,6 +8,15 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 31616ae4523018bdc88d48b33e44470ab68a954e Mon Sep 17 00:00:00 2001
From 5b1a436e79956e1daaf572813457f619fed1ff9d Mon Sep 17 00:00:00 2001
From: Carlos Lancha <[email protected]>
Date: Thu, 6 Aug 2020 14:42:21 +0200
Subject: [PATCH] LPS-118624 Don't pass languageId to css files requests
Expand All @@ -8,10 +8,10 @@ Subject: [PATCH] LPS-118624 Don't pass languageId to css files requests
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/ckeditor_base.js b/core/ckeditor_base.js
index 8285e83c64..ea4d38f8f2 100644
index 68c2371c7f..e67c9fee0c 100644
--- a/core/ckeditor_base.js
+++ b/core/ckeditor_base.js
@@ -183,7 +183,7 @@ if ( !window.CKEDITOR ) {
@@ -188,7 +188,7 @@ if ( !window.CKEDITOR ) {
var key = entries[0];
var value = entries[1];

Expand Down
6 changes: 3 additions & 3 deletions patches/0007-LPS-124728-Avoid-breaking-IE11.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 87053f94f7133ec1fc267c8d4bc25c7a9d40d7cd Mon Sep 17 00:00:00 2001
From d97257b9502be696c0c94c36365188af28a6ed6d Mon Sep 17 00:00:00 2001
From: Julien Castelain <[email protected]>
Date: Mon, 21 Dec 2020 09:12:53 +0100
Subject: [PATCH] LPS-124728 Avoid breaking IE11
Expand All @@ -11,10 +11,10 @@ they aren't loaded when getUrl is executed.
1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/core/ckeditor_base.js b/core/ckeditor_base.js
index ea4d38f8f2..fd94a94166 100644
index e67c9fee0c..d9bee755ae 100644
--- a/core/ckeditor_base.js
+++ b/core/ckeditor_base.js
@@ -170,26 +170,32 @@ if ( !window.CKEDITOR ) {
@@ -175,26 +175,32 @@ if ( !window.CKEDITOR ) {
* @returns {String} The full URL.
*/
getUrl: function( resource ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e3fe0fd56ddb02841d3415be1025e494e61bdf9b Mon Sep 17 00:00:00 2001
From c71372d2ca8ca43beead269e4fb082d2cf8c27c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20P=C3=A1kai?= <[email protected]>
Date: Fri, 8 Jan 2021 10:58:23 +0100
Subject: [PATCH] LPS-125559 Fix width for the following fields Cell spacing,
Expand All @@ -9,7 +9,7 @@ Subject: [PATCH] LPS-125559 Fix width for the following fields Cell spacing,
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/table/dialogs/table.js b/plugins/table/dialogs/table.js
index b19c2515df..6ffa71dc0f 100755
index 983b1706d6..0238f25d45 100755
--- a/plugins/table/dialogs/table.js
+++ b/plugins/table/dialogs/table.js
@@ -342,7 +342,7 @@
Expand Down
4 changes: 2 additions & 2 deletions patches/0009-LPS-131699-Add-null-check.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 11dc8885e95855c048c922c7470a165a4be3ade9 Mon Sep 17 00:00:00 2001
From bf78419124fecbce9542c2ae7958a76879d0d977 Mon Sep 17 00:00:00 2001
From: IstvanD <[email protected]>
Date: Wed, 19 May 2021 17:43:17 +0200
Subject: [PATCH] LPS-131699 Add null check
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH] LPS-131699 Add null check
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/event.js b/core/event.js
index 0490902530..3ff2cde4b6 100644
index 885943cac6..7967d8575f 100644
--- a/core/event.js
+++ b/core/event.js
@@ -172,7 +172,9 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 42e96cf0172be03ac56fb3256b0eb00dc55a7ecc Mon Sep 17 00:00:00 2001
From 01ba9f29c74507faf84c296ff1a5a0fffa6e050a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marko=20=C4=8Ciko=C5=A1?= <[email protected]>
Date: Mon, 9 Aug 2021 18:04:44 +0200
Subject: [PATCH] LPS-136119 Set `id` on first render, instead of changing it
Expand All @@ -9,7 +9,7 @@ Subject: [PATCH] LPS-136119 Set `id` on first render, instead of changing it
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/plugins/button/plugin.js b/plugins/button/plugin.js
index 9cc0584169..e0c996e9e4 100644
index 766ee18a0b..c6dc7963a7 100644
--- a/plugins/button/plugin.js
+++ b/plugins/button/plugin.js
@@ -143,7 +143,6 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 889a944dbfed333cf9c62ad88b12cf121db4d6f3 Mon Sep 17 00:00:00 2001
From fc9c9c728217db6fac6441596ec6224d485198cc Mon Sep 17 00:00:00 2001
From: Norbert Nemeth <[email protected]>
Date: Tue, 17 Aug 2021 11:20:58 +0200
Subject: [PATCH] LPS-136998 Avoid breaking the UI in firefox
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH] LPS-136998 Avoid breaking the UI in firefox
1 file changed, 13 deletions(-)

diff --git a/plugins/maximize/plugin.js b/plugins/maximize/plugin.js
index 2bb511945d..7223c436e1 100644
index 109d3ce34d..05dc1baab2 100644
--- a/plugins/maximize/plugin.js
+++ b/plugins/maximize/plugin.js
@@ -72,19 +72,6 @@
Expand Down
4 changes: 2 additions & 2 deletions patches/0012-LPS-137425-Don-t-check-selection-on-focus.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8bf5bc1230737c47a688f1e9423f4079324871f4 Mon Sep 17 00:00:00 2001
From 6c0dd7fa53a2fe934b723cc80ceea811c7fdf5c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marko=20=C4=8Ciko=C5=A1?= <[email protected]>
Date: Mon, 16 Aug 2021 18:36:20 +0200
Subject: [PATCH] LPS-137425 Don't check selection on focus
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH] LPS-137425 Don't check selection on focus
1 file changed, 9 deletions(-)

diff --git a/core/selection.js b/core/selection.js
index 4da7aff707..e96202fb3c 100644
index 62e1566d0d..d3f5538a74 100644
--- a/core/selection.js
+++ b/core/selection.js
@@ -976,15 +976,6 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 3c19c6264eddfc993c80a6a4d356d366aca39acb Mon Sep 17 00:00:00 2001
From a343dfde2e895cba7c369f4c05ce5436ec6eb673 Mon Sep 17 00:00:00 2001
From: Minhchau <[email protected]>
Date: Tue, 28 Sep 2021 11:18:40 -0700
Subject: [PATCH] LPS-139565 When upgrading from 6.2 to 7.1, image width/height
Expand All @@ -10,7 +10,7 @@ If inline styles for height/width are set on the image, prefer those over the na
1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/plugins/image2/plugin.js b/plugins/image2/plugin.js
index e85d58c2b1..87ddf82006 100644
index 69ba8c79e5..331663d514 100644
--- a/plugins/image2/plugin.js
+++ b/plugins/image2/plugin.js
@@ -375,8 +375,8 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 72c8c96f44517054aa8edc9b4705d160e444d168 Mon Sep 17 00:00:00 2001
From 89333501caea4ab6070c2eeb58de62ef13b27ce2 Mon Sep 17 00:00:00 2001
From: Diego Nascimento <[email protected]>
Date: Mon, 18 Oct 2021 17:45:43 -0300
Subject: [PATCH] LPS-137763 If contentsElement is defined, use it as a
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH] LPS-137763 If contentsElement is defined, use it as a
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/core/creators/themedui.js b/core/creators/themedui.js
index 94f64f1b55..c63560a5b3 100644
index 4efc2cbeea..6437140750 100644
--- a/core/creators/themedui.js
+++ b/core/creators/themedui.js
@@ -213,8 +213,10 @@ CKEDITOR.replaceClass = 'ckeditor';
Expand All @@ -27,7 +27,7 @@ index 94f64f1b55..c63560a5b3 100644
editor.mode = '';
} else {
diff --git a/plugins/wysiwygarea/plugin.js b/plugins/wysiwygarea/plugin.js
index 6c0a89d405..772839586c 100644
index c65f5b3aa9..6fb9055124 100644
--- a/plugins/wysiwygarea/plugin.js
+++ b/plugins/wysiwygarea/plugin.js
@@ -42,7 +42,7 @@
Expand Down
67 changes: 0 additions & 67 deletions plugins/wsc/skins/moono-lexicon/wsc.css

This file was deleted.