Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
0f23d3c0
Commit
0f23d3c0
authored
May 19, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:补充过滤复制文本标签
parent
00b25dfa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
src/modules/teach-tool/question-manage/components/QuestionEditor.jsx
+2
-0
src/modules/teach-tool/question-manage/components/QuestionEditor.less
+8
-12
No files found.
src/modules/teach-tool/question-manage/components/QuestionEditor.jsx
View file @
0f23d3c0
...
...
@@ -133,9 +133,11 @@ class QuestionEditor extends Component {
str1
=
str1
.
replace
(
/
[
|
]
*
\n
/g
,
"
\
n"
);
str1
=
str1
.
replace
(
/
\&
nbsp
\;
/gi
,
" "
);
str1
=
str1
.
replace
(
/
[\r\n]
/g
,
""
);
str1
=
str1
.
replace
(
/<
\/?
a.*
?
>/g
,
""
);
var
str2
=
content
;
// 保留空格和换行的其他字符
str2
=
str2
.
replace
(
/<xml>
[\s\S]
*
?
<
\/
xml>/gi
,
""
);
str2
=
str2
.
replace
(
/<style>
[\s\S]
*
?
<
\/
style>/gi
,
""
);
str2
=
str2
.
replace
(
/<
\/?
a.*
?
>/g
,
""
);
if
(
editorRoot
.
txt
.
text
().
length
+
str1
.
length
>
1000
)
{
content
=
str2
.
substring
(
0
,
1000
);
message
.
error
(
"内容过长,不能超过1000字"
);
...
...
src/modules/teach-tool/question-manage/components/QuestionEditor.less
View file @
0f23d3c0
...
...
@@ -44,14 +44,12 @@
p {
font-size: 14px !important;
}
h1,
h2,
h3,
h4,
h5,
h6 {
*:not(p){
font-weight: normal !important;
font-size: 14px !important;
font-style: normal !important;
text-decoration: none !important;
margin: 0 !important;
}
}
.editor-limit {
...
...
@@ -74,14 +72,12 @@
font-size: 14px !important;
overflow-y: scroll;
}
h1,
h2,
h3,
h4,
h5,
h6 {
*:not(p) {
font-weight: normal !important;
font-size: 14px !important;
font-style: normal !important;
text-decoration: none !important;
margin: 0 !important;
}
}
.editor-limit {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment