shengnian-editor
Version:
Shengnian React Rich Text Editor
607 lines (495 loc) • 9.7 kB
CSS
.root {
background: #fff;
/*border: 1px solid #ddd;*/
/*border-radius: 3px;*/
border: none;
/*font-family: 'Georgia', serif;*/
/*font-size: 14px;*/
}
.hidePlaceholder :global(.public-DraftEditorPlaceholder-root) {
display: none;
}
.editor :global(.public-DraftEditor-content) {
overflow: auto;
}
.editor {
cursor: text;
/*font-size: 16px;*/
}
.editor {
word-break: break-all;
white-space: pre-wrap;
}
.editor a:not(.video-box):not(.link-box):not(.member__mention):not(.video-card__link):not(.user-link__link) {
text-decoration: none;
cursor: pointer;
border-bottom: 1px solid rgba(64, 64, 64, 0.72);
}
.editor a:not(.video-box):not(.link-box):not(.member__mention):not(.video-card__link):not(.user-link__link):hover {
color: #175199;
border-color: rgba(62, 122, 194, 0.72);
}
.editor a:not(.video-box):not(.link-box):not(.member__mention):not(.video-card__link):not(.user-link__link) > .ellipsis::after {
content: '...';
}
.editor a:not(.video-box):not(.link-box):not(.member__mention):not(.video-card__link):not(.user-link__link) > .invisible {
/* .u-hideText */
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
}
.editor a:not(.video-box):not(.link-box):not(.member__mention):not(.video-card__link):not(.user-link__link) u {
border-color: transparent;
}
.editor a.member__mention,
.editor a.user-link__link {
border-bottom: 1px solid rgba(62, 122, 194, 0.72);
}
.editor u {
text-decoration: none;
border-bottom: 1px solid rgba(64, 64, 64, 0.72);
}
.editor u a:not(.video-box):not(.link-box):not(.member__mention):not(.video-card__link) {
border-color: transparent;
}
.editor b {
font-weight: 700;
}
.editor h1,
.editor h2,
.editor h3,
.editor h4,
.editor h5,
.editor h6 {
margin-top: 1em;
margin-bottom: 1em;
font-size: 18px;
font-weight: 400;
}
.editor p {
margin-top: 0;
margin-bottom: 0.72em;
}
.editor .content__image, .editor origin__image {
display: block;
max-width: 100%;
margin-top: 0.72em;
margin-bottom: 0.72em;
}
.editor .lightbox-thumb {
cursor: -webkit-zoom-in;
}
.editor blockquote {
padding-left: 1em;
margin: 1em 0;
color: #6b7a8c;
border-left: 4px solid #cfd8e6;
}
.editor blockquote a:not(.video-box):not(.link-box):not(.member__mention):not(.video-card__link) {
border-color: rgba(107, 122, 140, 0.72);
}
.editor ul, .editor ol {
padding-left: 2em;
margin: 1em 0;
}
.editor ul li, .editor ol li {
list-style-position: outside;
}
.editor ul ul, .editor ul ol, .editor ol ul, .editor ol ol {
margin: 0;
}
.editor ul li {
list-style-type: disc;
list-style-type: initial;
}
.editor ol li {
list-style-type: none;
}
.editor .video-box, .editor .link-box {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
justify-content: space-between;
margin-top: 16px;
margin-bottom: 16px;
overflow: auto;
white-space: normal;
cursor: pointer;
border: solid 1px #e7eaf1;
border-radius: 4px;
box-shadow: 0 1px 3px 0 rgba(0, 34, 77, 0.05);
}
.editor .video-box .thumbnail, .editor .link-box .thumbnail {
flex-shrink: 0;
width: 90px;
height: 90px;
object-fit: cover;
}
.editor .video-box .content, .editor .link-box .content {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
padding: 10px 16px;
overflow: hidden;
flex-direction: column;
justify-content: space-around;
}
.editor .video-box .title, .editor .link-box .title {
font-size: 18px;
font-weight: 400;
}
.editor .video-box .url, .editor .link-box .url {
overflow: hidden;
font-size: 15px;
color: #8798ae;
/* .u-ellipsis */
text-overflow: ellipsis;
word-wrap: normal;
white-space: nowrap;
}
.editor .video-box .label, .editor .link-box .label {
display: none;
}
.editor img[eeimg] {
max-width: 100%;
vertical-align: middle;
}
.editor img[eeimg='1'] {
display: inline-block;
margin: 0 3px;
}
.editor hr {
width: 240px;
max-width: 100%;
margin: 32px auto;
border: none;
border-top: 1px solid #e7eaf1;
}
.editor pre {
margin: 1em 0;
padding: 10px;
overflow: auto;
font-family: Menlo, Monaco, Consolas, 'Andale Mono', 'lucida console', 'Courier New', monospace;
font-size: 14px;
word-wrap: normal;
background: #ebebeb;
/*background: #ebeef5;*/
border-radius: 3px;
/* stylelint-disable declaration-block-single-line-max-declarations */
/* Comment */
/* Error */
/* Keyword */
/* Operator */
/* Comment.Multiline */
/* Comment.Preproc */
/* Comment.Single */
/* Comment.Special */
/* Generic.Deleted */
/* Generic.Emph */
/* Generic.Error */
/* Generic.Heading */
/* Generic.Inserted */
/* Generic.Output */
/* Generic.Prompt */
/* Generic.Strong */
/* Generic.Subheading */
/* Generic.Traceback */
/* Keyword.Constant */
/* Keyword.Declaration */
/* Keyword.Namespace */
/* Keyword.Pseudo */
/* Keyword.Reserved */
/* Keyword.Type */
/* Literal.Number */
/* Literal.String */
/* Name.Attribute */
/* Name.Builtin */
/* Name.Class */
/* Name.Constant */
/* Name.Entity */
/* Name.Exception */
/* Name.Function */
/* Name.Namespace */
/* Name.Tag */
/* Name.Variable */
/* Operator.Word */
/* Text.Whitespace */
/* Literal.Number.Float */
/* Literal.Number.Hex */
/* Literal.Number.Integer */
/* Literal.Number.Oct */
/* Literal.String.Backtick */
/* Literal.String.Char */
/* Literal.String.Doc */
/* Literal.String.Double */
/* Literal.String.Escape */
/* Literal.String.Heredoc */
/* Literal.String.Interpol */
/* Literal.String.Other */
/* Literal.String.Regex */
/* Literal.String.Single */
/* Literal.String.Symbol */
/* Name.Builtin.Pseudo */
/* Name.Variable.Class */
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */
}
.editor pre .hll {
background-color: #ffc;
}
.editor pre .c {
font-style: italic;
color: #998;
}
.editor pre .err {
color: #a61717;
background-color: #e3d2d2;
}
.editor pre .k {
font-weight: bold;
}
.editor pre .o {
font-weight: bold;
}
.editor pre .cm {
font-style: italic;
color: #998;
}
.editor pre .cp {
font-weight: bold;
color: #999;
}
.editor pre .c1 {
font-style: italic;
color: #998;
}
.editor pre .cs {
font-style: italic;
font-weight: bold;
color: #999;
}
.editor pre .gd {
color: #000;
background-color: #fdd;
}
.editor pre .ge {
font-style: italic;
}
.editor pre .gr {
color: #a00;
}
.editor pre .gh {
color: #999;
}
.editor pre .gi {
color: #000;
background-color: #dfd;
}
.editor pre .go {
color: #888;
}
.editor pre .gp {
color: #555;
}
.editor pre .gs {
font-weight: bold;
}
.editor pre .gu {
color: #aaa;
}
.editor pre .gt {
color: #a00;
}
.editor pre .kc {
font-weight: bold;
}
.editor pre .kd {
font-weight: bold;
}
.editor pre .kn {
font-weight: bold;
}
.editor pre .kp {
font-weight: bold;
}
.editor pre .kr {
font-weight: bold;
}
.editor pre .kt {
font-weight: bold;
color: #458;
}
.editor pre .m {
color: #099;
}
.editor pre .s {
color: #d32;
}
.editor pre .na {
color: #008080;
}
.editor pre .nb {
color: #008080;
}
.editor pre .nc {
font-weight: bold;
color: #458;
}
.editor pre .no {
color: #008080;
}
.editor pre .ni {
color: #800080;
}
.editor pre .ne {
font-weight: bold;
color: #900;
}
.editor pre .nf {
font-weight: bold;
color: #900;
}
.editor pre .nn {
color: #555;
}
.editor pre .nt {
color: #000080;
}
.editor pre .nv {
color: #008080;
}
.editor pre .ow {
font-weight: bold;
}
.editor pre .w {
color: #bbb;
}
.editor pre .mf {
color: #099;
}
.editor pre .mh {
color: #099;
}
.editor pre .mi {
color: #099;
}
.editor pre .mo {
color: #099;
}
.editor pre .sb {
color: #d32;
}
.editor pre .sc {
color: #d32;
}
.editor pre .sd {
color: #d32;
}
.editor pre .s2 {
color: #d32;
}
.editor pre .se {
color: #d32;
}
.editor pre .sh {
color: #d32;
}
.editor pre .si {
color: #d32;
}
.editor pre .sx {
color: #d32;
}
.editor pre .sr {
color: #808000;
}
.editor pre .s1 {
color: #d32;
}
.editor pre .ss {
color: #d32;
}
.editor pre .bp {
color: #999;
}
.editor pre .vc {
color: #008080;
}
.editor pre .vg {
color: #008080;
}
.editor pre .vi {
color: #008080;
}
.editor pre .il {
color: #099;
}
.editor pre::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.editor pre::-webkit-scrollbar-thumb:horizontal {
background-color: rgba(0, 0, 0, 0.5);
border-radius: 6px;
}
.editor pre::-webkit-scrollbar-thumb:horizontal:hover {
background-color: rgba(0, 0, 0, 0.6);
}
.editor .katex-display {
text-align: left;
}
.editor {
white-space: normal;
}
.editor a, .editor a:not(.video-box):not(.link-box):not(.member_mention) {
color: #259;
text-decoration: none;
border-bottom: 0;
}
.editor a:hover, .editor a:not(.video-box):not(.link-box):not(.member_mention):hover {
text-decoration: underline;
color: #259;
}
.editor p {
margin: 20px 0;
}
.editor ul + br,
.editor ol + br,
.editor p + br {
display: none;
}
.editor h1, .editor h2, .editor h3, .editor h4 {
margin: 20px 0;
font-size: 24px;
font-weight: normal;
}
.editor blockquote, .editor ul, .editor ol {
margin: 20px 0 20px;
}
.editor img, .editor .VagueImage {
display: block;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
.editor blockquote {
padding-left: 1.2em;
border-left: 4px solid #e2e3e4;
color: #333;
}
.editor blockquote + blockquote {
margin-top: -20px;
}
.editor li {
margin-top: 10px;
}
.editor ul, .editor ol {
padding-left: 40px;
}
.editor embed {
width: 100%;
}