From 3a7224c2ec85b26496cf2dc2d72282d37cf8536a Mon Sep 17 00:00:00 2001 From: Klaas Poortinga Date: Mon, 30 Mar 2020 19:33:03 +0200 Subject: [PATCH] Improve richeditor support for preview mode and attributes property (#5011) --- .../richeditor/assets/css/richeditor.css | 13 +++++- .../richeditor/assets/less/richeditor.less | 45 +++++++++++++++++++ .../richeditor/partials/_richeditor.htm | 3 +- 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css index aa368cccf..6e64071ce 100755 --- a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css +++ b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css @@ -564,4 +564,15 @@ body .fr-popup .fr-checkbox span {border-color:#d1d6d9} .control-richeditor figure[data-audio]:before {position:static;margin-right:8px} .control-richeditor figure[data-video]:before {font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;content:"\f03d"} .control-richeditor figure[data-audio]:before {font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;content:"\f028"} -.fr-quick-insert a.fr-floating-btn {color:rgba(64,82,97,0.8);text-decoration:none} \ No newline at end of file +.fr-quick-insert a.fr-floating-btn {color:rgba(64,82,97,0.8);text-decoration:none} +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command {cursor:not-allowed} +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command:hover, +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command:focus {color:#bdbdbd;-webkit-box-shadow:none;box-shadow:none} +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command:hover::after, +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command:focus::after {border-top-color:#bdbdbd !important} +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command.fr-btn-hover {color:#bdbdbd;background:transparent} +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command.fr-btn-hover::after {border-top-color:#bdbdbd !important} +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command.fr-btn.fr-options:hover, +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command.fr-btn.fr-options:focus {border-left:solid 1px transparent} +.fr-box.fr-basic .fr-toolbar.fr-disabled .fr-command.fr-btn.fr-options.fr-btn-hover {border-left:solid 1px transparent} +.fr-box.fr-basic .fr-element.fr-disabled {cursor:not-allowed} diff --git a/modules/backend/formwidgets/richeditor/assets/less/richeditor.less b/modules/backend/formwidgets/richeditor/assets/less/richeditor.less index 97d8b7e9e..520ad2327 100755 --- a/modules/backend/formwidgets/richeditor/assets/less/richeditor.less +++ b/modules/backend/formwidgets/richeditor/assets/less/richeditor.less @@ -224,3 +224,48 @@ text-decoration: none; } } + +// +// Additions to disabled state +// + +.fr-box.fr-basic { + // Toolbar + .fr-toolbar.fr-disabled { + .fr-command { + cursor: not-allowed; + + &:hover, &:focus { + color: #bdbdbd; + -webkit-box-shadow: none; + box-shadow: none; + + &::after { + border-top-color: #bdbdbd!important; + } + } + + &.fr-btn-hover { + color: #bdbdbd; background: transparent; + + &::after { + border-top-color:#bdbdbd !important + } + } + + &.fr-btn.fr-options { + &:hover, &:focus { + border-left:solid 1px transparent; + } + &.fr-btn-hover { + border-left:solid 1px transparent; + } + } + } + } + + // Content + .fr-element.fr-disabled { + cursor: not-allowed; + } +} diff --git a/modules/backend/formwidgets/richeditor/partials/_richeditor.htm b/modules/backend/formwidgets/richeditor/partials/_richeditor.htm index 5b7d0c63c..83a80a963 100755 --- a/modules/backend/formwidgets/richeditor/partials/_richeditor.htm +++ b/modules/backend/formwidgets/richeditor/partials/_richeditor.htm @@ -23,7 +23,8 @@ data-table-cell-styles="" data-links-handler="getEventHandler('onLoadPageLinksForm') ?>" data-ace-vendor-path="" - data-control="richeditor"> + data-control="richeditor" + getAttributes() ?>>