refactor(editor): 优化富文本编辑器内容格式转换逻辑
- 改进 HTML 到 Markdown 的转换规则,处理块级元素和行内元素的嵌套关系 - 优化图片和视频标签的解析逻辑,确保附件正确提取 - 修复换行符处理问题,避免产生多余空行 - 增强居中文本和标题的格式转换准确性 - 清理调试日志和冗余代码
This commit is contained in:
@@ -18,9 +18,11 @@
|
||||
&:not(:last-child) {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 468px;
|
||||
height: 60px;
|
||||
@@ -37,6 +39,7 @@
|
||||
border-radius: 20px 20px 20px 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.icon {
|
||||
width: 15px;
|
||||
height: 12px;
|
||||
@@ -91,6 +94,7 @@
|
||||
.people {
|
||||
position: relative;
|
||||
justify-content: space-between;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
@@ -119,6 +123,7 @@
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: 50%;
|
||||
|
||||
.img {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
@@ -128,12 +133,15 @@
|
||||
&:nth-child(4) {
|
||||
margin-right: -9px;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
margin-right: -9px;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-right: -7px;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-right: -5px;
|
||||
}
|
||||
@@ -145,6 +153,7 @@
|
||||
.topic-list {
|
||||
.item {
|
||||
cursor: pointer;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
@@ -222,8 +231,10 @@
|
||||
border-radius: 10px;
|
||||
padding-left: 12px;
|
||||
margin-top: 12px;
|
||||
|
||||
.adv {
|
||||
margin-right: 26px;
|
||||
|
||||
.adv-icon {
|
||||
width: 295px;
|
||||
height: 118px;
|
||||
@@ -279,6 +290,7 @@
|
||||
|
||||
.header-content-right {
|
||||
width: 240px;
|
||||
|
||||
.post-entrance {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e9eef2;
|
||||
@@ -357,9 +369,11 @@
|
||||
height: 140px;
|
||||
margin-bottom: 10px;
|
||||
display: block;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 240px;
|
||||
height: 140px;
|
||||
@@ -394,12 +408,15 @@
|
||||
&:nth-child(1) {
|
||||
border-top-left-radius: 8px;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
border-top-right-radius: 8px;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
border-bottom-left-radius: 8px;
|
||||
}
|
||||
|
||||
&:nth-child(4) {
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
@@ -429,6 +446,7 @@
|
||||
line-height: 22px;
|
||||
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
|
||||
font-weight: 650;
|
||||
@@ -455,6 +473,7 @@
|
||||
padding: 20px;
|
||||
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.168627450980392);
|
||||
flex-direction: column;
|
||||
|
||||
.QRcode {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
@@ -472,13 +491,21 @@
|
||||
|
||||
.offer-box {
|
||||
width: 240px;
|
||||
height: 214px;
|
||||
// height: 214px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e9eef2;
|
||||
border-radius: 10px;
|
||||
padding: 17px 10px;
|
||||
// padding: 17px 10px;
|
||||
overflow: hidden;
|
||||
|
||||
height: 64px;
|
||||
padding: 15px 10px;
|
||||
|
||||
&.big {
|
||||
height: 214px;
|
||||
padding: 17px 10px;
|
||||
}
|
||||
|
||||
&.small {
|
||||
height: 64px;
|
||||
padding: 15px 10px;
|
||||
@@ -521,6 +548,7 @@
|
||||
|
||||
.admission {
|
||||
margin-bottom: 30px;
|
||||
|
||||
.admission-header {
|
||||
margin-bottom: 24px;
|
||||
display: inline-flex;
|
||||
@@ -543,6 +571,7 @@
|
||||
|
||||
.admission-list {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.admission-item {
|
||||
width: 291px;
|
||||
height: 103px;
|
||||
@@ -602,6 +631,7 @@
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.item {
|
||||
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
|
||||
font-weight: 400;
|
||||
@@ -622,6 +652,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-box {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
@@ -641,6 +672,7 @@
|
||||
height: 220px;
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 291px;
|
||||
height: 220px;
|
||||
@@ -669,4 +701,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user