diff --git a/src/resources/assets/css/common.less b/src/resources/assets/css/common.less index deaed177ff2dc10a7322c6ec1a58d4155e217509..402136c8f800a7fe05faf7818712a86ac669b924 100644 --- a/src/resources/assets/css/common.less +++ b/src/resources/assets/css/common.less @@ -1820,19 +1820,6 @@ span { .ivu-modal-content { border-radius: 10px; } - -.ck-content { - ul, - ol { - // text-indent: 1em; - } - ul li { - list-style: disc inside; - } - ol li { - list-style: decimal inside; - } -} .combinesearcher-drop { max-height: none; } diff --git a/src/resources/plugins/TsCkeditor/TsCkeditor.vue b/src/resources/plugins/TsCkeditor/TsCkeditor.vue index 251fa02f09d9d22262136dc72aefb48875be1967..a247b4a8d17dd5f8dadbc0b96c8f5b5a3baec01c 100644 --- a/src/resources/plugins/TsCkeditor/TsCkeditor.vue +++ b/src/resources/plugins/TsCkeditor/TsCkeditor.vue @@ -4,6 +4,7 @@ v-if="readonly" v-imgViewer :class="readonlyTextIsHighlight ? 'text-warning' : ''" + class="ckeditor-readonly-content-box" v-html="currentValue ? currentValue : '-'" >
diff --git a/src/resources/plugins/TsCkeditor/ckeditor.less b/src/resources/plugins/TsCkeditor/ckeditor.less index 037cb45b141f3884dd59926d41dbdfa22b2719f0..a1dfb05f6e24820abf735a302fbc5ebee3e2232a 100644 --- a/src/resources/plugins/TsCkeditor/ckeditor.less +++ b/src/resources/plugins/TsCkeditor/ckeditor.less @@ -9,11 +9,44 @@ } } } +.ckeditor-readonly-content-box { + // 处理只读模式下,有些样式丢失的问题,只读模式下没有ck-content类名 + code { + background-color: hsla(0, 0%, 78%, 0.3); + border-radius: 2px; + padding: 0.15em; + } + blockquote { + border-left: 5px solid #ccc; + font-style: italic; + margin-left: 0; + margin-right: 0; + overflow: hidden; + padding-left: 1.5em; + padding-right: 1.5em; + } +} .ck-content { min-height: 130px; - // >p{ - // margin-top: 0; - // } + ul, + ol { + padding-inline-start: 40px; + } + ul { + list-style: disc; + li { + list-style: disc; + } + } + ol { + list-style: decimal; + li { + list-style: decimal; + } + } + i { + font-style: italic; + } } .ck .ck-placeholder:before, .ck.ck-placeholder:before { @@ -137,7 +170,7 @@ } .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content { border: solid var(--border-color, @border-color-base); - border-radius: 10px 10px 0 0; + border-radius: 10px 10px 0 0 !important; border-width: 1px 1px 0; }