From d93c5a37d4f7442186a0b309b6915cf3b42e2358 Mon Sep 17 00:00:00 2001 From: Julien Castelain Date: Tue, 13 Oct 2020 09:41:25 +0200 Subject: [PATCH] fix: make text wrap in codemirror plugin In [5de7cdbed7e7e9b50cd5e77d5dc020e137b104a3](https://github.com/liferay/liferay-portal/commit/5de7cdbed7e7e9b50cd5e77d5dc020e137b104a3), and [1783acf68ee470fa79619462e8c2df6f9ec39d4a](https://github.com/liferay/liferay-portal/commit/1783acf68ee470fa79619462e8c2df6f9ec39d4a) we intended to fix line wrapping in the codemirror (source view) plugin but this was apparently missing **Test plan**: - Fetch this branch and build `liferay-ckeditor` with ```sh ./ck.sh build ``` - Use the previously built version of `liferay-ckeditor` in DXP - Deploy the `frontend-editor-ckeditor-web` OSGi module - Navigate to **Instance Settings** > **Email** - Assert that the editors wrap text correctly --- plugins/codemirror/skins/default.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/codemirror/skins/default.css b/plugins/codemirror/skins/default.css index 72987ca990..1ea15f94a9 100644 --- a/plugins/codemirror/skins/default.css +++ b/plugins/codemirror/skins/default.css @@ -15,6 +15,11 @@ a.cke_button__source.cke_button_off + a.cke_button__expand.cke_button_disabled { white-space: pre-wrap; } +.cke_reset .CodeMirror-wrap pre.CodeMirror-line { + white-space: pre-wrap; + word-break: break-word; +} + .cke_dialog .code_preview { border-left: 1px solid #bcbcbc; overflow-x: auto;