refactor(editor): 重构编辑器组件及样式,优化功能实现
重构编辑器工具栏样式及功能,使用wangEditor替换原有实现 优化图片和视频上传逻辑,增加自定义校验和上传处理 调整编辑器样式,修复对齐功能及段落标题样式 更新表情选择器位置逻辑,支持上下方向显示 统一组件导入方式,添加版本控制参数防止缓存
This commit is contained in:
99
css/edit.css
99
css/edit.css
@@ -73,18 +73,44 @@
|
||||
color: #555;
|
||||
font-size: 14px;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar {
|
||||
#edit .edit-container #editor—wrapper {
|
||||
z-index: 100;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
background-color: #fbfbfb;
|
||||
padding-left: 25px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .w-e-panel-content-emotion {
|
||||
width: 490px;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .w-e-bar-item-group .w-e-bar-item-menus-container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar > .w-e-bar {
|
||||
background-color: transparent;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .w-e-toolbar {
|
||||
padding: 0;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .w-e-toolbar > .w-e-bar-item {
|
||||
margin-right: 40px;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .w-e-toolbar > .w-e-bar-item > button {
|
||||
color: #000000;
|
||||
padding: 0 10px;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item {
|
||||
cursor: pointer;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
height: 30px !important;
|
||||
line-height: 30px !important;
|
||||
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
@@ -93,15 +119,21 @@
|
||||
line-height: 23px;
|
||||
margin-right: 40px;
|
||||
position: relative;
|
||||
padding: 0 10px;
|
||||
border-radius: 50px;
|
||||
padding: 0;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .icon {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .file {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item > button {
|
||||
padding: 0 10px;
|
||||
border-radius: 50px;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item > button.active {
|
||||
background-color: #f6f6bd;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .file {
|
||||
opacity: 0;
|
||||
/* 隐藏输入框 */
|
||||
background: transparent;
|
||||
@@ -113,7 +145,7 @@
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .file::after {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .file::after {
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -121,14 +153,14 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.expression.pitch .emoji-box-mask {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.expression.pitch .emoji-box-mask {
|
||||
display: block;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.expression.pitch .emoji-box {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.expression.pitch .emoji-box {
|
||||
display: flex;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .link-box-mask,
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .emoji-box-mask {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .link-box-mask,
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .emoji-box-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -137,10 +169,10 @@
|
||||
z-index: 1;
|
||||
display: none;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .link-box-mask {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .link-box-mask {
|
||||
background: transparent;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .emoji-box {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .emoji-box {
|
||||
width: 582px;
|
||||
border-radius: 8px;
|
||||
background-color: #fff;
|
||||
@@ -156,7 +188,7 @@
|
||||
font-size: 22px;
|
||||
padding: 8px;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .emoji-box::after {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .emoji-box::after {
|
||||
content: "";
|
||||
width: 0;
|
||||
height: 0;
|
||||
@@ -168,17 +200,17 @@
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item .emoji-box .emoji-icon {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item .emoji-box .emoji-icon {
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link.pitch .link-box-mask {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link.pitch .link-box-mask {
|
||||
display: block;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link.pitch .link-box {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link.pitch .link-box {
|
||||
display: flex;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link .link-box {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link .link-box {
|
||||
background-color: #ffffff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.16862745);
|
||||
@@ -193,11 +225,11 @@
|
||||
flex-direction: column;
|
||||
padding: 18px 20px 0;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link .link-box .item {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link .link-box .item {
|
||||
margin-bottom: 22px;
|
||||
flex-direction: column;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link .link-box .item .name {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link .link-box .item .name {
|
||||
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
@@ -206,7 +238,7 @@
|
||||
line-height: 26px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link .link-box .item .input {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link .link-box .item .input {
|
||||
height: 36px;
|
||||
border: 1px solid #d7d7d7;
|
||||
border-radius: 7px;
|
||||
@@ -214,7 +246,7 @@
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link .link-box .btn {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link .link-box .btn {
|
||||
width: 72px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
@@ -228,12 +260,27 @@
|
||||
color: #000000;
|
||||
margin-top: 8px;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.link .link-box .btn:hover {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.link .link-box .btn:hover {
|
||||
background-color: #23e0b6;
|
||||
}
|
||||
#edit .edit-container .editor-toolbar .toolbar-item.h2.pitch {
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.h2.pitch {
|
||||
background-color: #f6f6bd;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper .editor-toolbar .toolbar-item.active > button {
|
||||
background-color: #f6f6bd;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper #editor-container {
|
||||
min-height: 500px;
|
||||
max-height: 80vh;
|
||||
font-size: 18px;
|
||||
line-height: 26px;
|
||||
color: #333333;
|
||||
}
|
||||
#edit .edit-container #editor—wrapper #editor-container a {
|
||||
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
|
||||
text-decoration: underline;
|
||||
color: #04b0d5;
|
||||
}
|
||||
#edit .edit-container .content-input {
|
||||
min-height: 509px;
|
||||
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
|
||||
|
||||
Reference in New Issue
Block a user