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

LPS-116201 Update liferay-ckeditor version in portal and implement changes to make it fit with new skin #66

Closed
wants to merge 9 commits into from
Expand Up @@ -5,7 +5,6 @@
@import 'portal/dropdown';
@import 'portal/edit_layout';
@import 'portal/editor_alloy';
@import 'portal/editor_ckeditor';
@import 'portal/editor_lfr_source';
@import 'portal/forms';
@import 'portal/generic_portal';
Expand Down

This file was deleted.

Expand Up @@ -74,6 +74,8 @@ public void populateConfigJSONObject(
"removePlugins",
"contextmenu,elementspath,floatingspace,image,link,liststyle," +
"resize,table,tabletools,toolbar"
).put(
"skin", "moono-lisa"
);

String namespace = GetterUtil.getString(
Expand Down
Expand Up @@ -2,7 +2,7 @@
"dependencies": {
"ckeditor4-react": "1.0.1",
"frontend-js-web": "*",
"liferay-ckeditor": "4.13.1-liferay.5"
"liferay-ckeditor": "4.14.1-liferay.1"
},
"main": "index.js",
"name": "frontend-editor-ckeditor-web",
Expand Down
Expand Up @@ -60,31 +60,12 @@ public void populateConfigJSONObject(
HtmlUtil.escape(
PortalUtil.getStaticResourceURL(
themeDisplay.getRequest(),
"/o/frontend-css-web/main.css")))
"/o/frontend-editor-ckeditor-web/ckeditor/skins" +
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed? I'd expect CKEditor to load this automatically when passing in a different skin?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked, we don't need this :D

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we set the skin to be the default in our build process in liferay-ckeditor?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"/moono-lexicon/editor.css")))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting that we need this here... 🤔

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me check again

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we need it:

image

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how did it use to work before? Were we also adding the moono.css file manually? It doesn't feel 100% right. I'd expect CKEditor's ContextMenu plugin to be already fetching the skin... but I could be wrong here...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, wait, before applying the new styles we were not passing any contextmenu_contentsCss param to CKEditor, we added it to apply the styles from portal, probably we're overwriting it. Checking what happen if we remove the param.

).put(
"contentsLangDirection",
HtmlUtil.escapeJS(
getContentsLanguageDir(inputEditorTaglibAttributes))
).put(
"contextmenu_contentsCss",
JSONUtil.putAll(
HtmlUtil.escape(
PortalUtil.getStaticResourceURL(
themeDisplay.getRequest(),
themeDisplay.getPathThemeCss() + "/clay.css")),
HtmlUtil.escape(
PortalUtil.getStaticResourceURL(
themeDisplay.getRequest(),
themeDisplay.getPathThemeCss() + "/main.css")),
HtmlUtil.escape(
PortalUtil.getStaticResourceURL(
themeDisplay.getRequest(),
"/o/frontend-editor-ckeditor-web/ckeditor/skins" +
"/moono-lisa/editor.css")),
HtmlUtil.escape(
PortalUtil.getStaticResourceURL(
themeDisplay.getRequest(),
"/o/frontend-css-web/main.css")))
);

String contentsLanguageId = getContentsLanguageId(
Expand Down
@@ -1,11 +1,3 @@
.html-editor.portlet {
background: #fff;
color: #000;
line-height: 1;
padding: 1em;
text-align: start;
}

.html-editor.portlet-message-boards {
@include hyphens();

Expand Down
8 changes: 4 additions & 4 deletions modules/yarn.lock
Expand Up @@ -11775,10 +11775,10 @@ liferay-amd-loader@4.3.0:
resolved "https://registry.yarnpkg.com/liferay-amd-loader/-/liferay-amd-loader-4.3.0.tgz#5a6e6b94374f3d5298f637aca57220ec0b3c66ce"
integrity sha512-8y7jgugf3RzcmA7t4eKJaNFMKI/e2K9+UaAAuT2maDd2X047E961nELmomRfEaXA5aWIS7SvKlP/dnvfGEvxPw==

liferay-ckeditor@4.13.1-liferay.5:
version "4.13.1-liferay.5"
resolved "https://registry.yarnpkg.com/liferay-ckeditor/-/liferay-ckeditor-4.13.1-liferay.5.tgz#8a2da76289f76bbcba6014e93ad835f654c04d73"
integrity sha512-wPmk5EAW+LmOxqO0JO98x1ByEzkvDLP+PrIxlz+DMuonuC7O5qWxCuha1v+UtDnPdQnRdf3PNNicY+0xPCYvQw==
liferay-ckeditor@4.14.1-liferay.1:
version "4.14.1-liferay.1"
resolved "https://registry.yarnpkg.com/liferay-ckeditor/-/liferay-ckeditor-4.14.1-liferay.1.tgz#6c2c3b3f89f6c7d29fe1905ccfaa40fd4ac1ef2b"
integrity sha512-rw8UVO8qvPJq9BahcatQ4lP0yilXS17mNKtscATotou5DTfFupuiLHi+ziOE/9TxjLKPYspnECtELibxxZK9EQ==

liferay-font-awesome@3.4.0:
version "3.4.0"
Expand Down