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
f39805dd
Commit
f39805dd
authored
Mar 22, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:bug修复
parent
3f8abeb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/modules/teach-tool/components/QuestionEditor.jsx
+3
-5
src/modules/teach-tool/modal/QuestionPreviewModal.jsx
+1
-0
No files found.
src/modules/teach-tool/components/QuestionEditor.jsx
View file @
f39805dd
...
@@ -119,6 +119,7 @@ class QuestionEditor extends Component {
...
@@ -119,6 +119,7 @@ class QuestionEditor extends Component {
editorRoot
.
config
.
zIndex
=
999
;
editorRoot
.
config
.
zIndex
=
999
;
editorRoot
.
config
.
placeholder
=
""
;
editorRoot
.
config
.
placeholder
=
""
;
editorRoot
.
config
.
pasteFilterStyle
=
false
;
editorRoot
.
config
.
pasteFilterStyle
=
false
;
editorRoot
.
config
.
focus
=
false
;
// 自定义处理粘贴的文本内容
// 自定义处理粘贴的文本内容
editorRoot
.
config
.
pasteTextHandle
=
function
(
content
)
{
editorRoot
.
config
.
pasteTextHandle
=
function
(
content
)
{
if
(
content
==
""
&&
!
content
)
return
""
;
if
(
content
==
""
&&
!
content
)
return
""
;
...
@@ -218,14 +219,10 @@ class QuestionEditor extends Component {
...
@@ -218,14 +219,10 @@ class QuestionEditor extends Component {
);
);
};
};
editorRoot
.
config
.
onblur
=
(
html
)
=>
{
editorRoot
.
config
.
onblur
=
()
=>
{
html
=
html
.
replace
(
/<
(?!
img|input
)
.*
?
>/g
,
""
);
html
=
html
.
replace
(
/
\s
+/g
,
""
);
const
conLen
=
html
.
length
;
this
.
setState
({
this
.
setState
({
focusFlag
:
false
,
focusFlag
:
false
,
visibleMediaBox
:
false
,
visibleMediaBox
:
false
,
visiblePlacehold
:
conLen
===
0
,
zIndex
:
9
,
zIndex
:
9
,
});
});
};
};
...
@@ -300,6 +297,7 @@ class QuestionEditor extends Component {
...
@@ -300,6 +297,7 @@ class QuestionEditor extends Component {
limitLength
=
1000
,
limitLength
=
1000
,
markKey
,
markKey
,
}
=
this
.
props
;
}
=
this
.
props
;
console
.
log
(
"visiblePlacehold"
,
visiblePlacehold
)
return
(
return
(
<
div
<
div
className=
{
`question-edtior_box question-edtior_box__${markKey}`
}
className=
{
`question-edtior_box question-edtior_box__${markKey}`
}
...
...
src/modules/teach-tool/modal/QuestionPreviewModal.jsx
View file @
f39805dd
...
@@ -225,6 +225,7 @@ class QuestionPreviewModal extends Component {
...
@@ -225,6 +225,7 @@ class QuestionPreviewModal extends Component {
)
}
)
}
{
[
"JUDGE"
].
includes
(
questionTypeEnum
)
&&
{
[
"JUDGE"
].
includes
(
questionTypeEnum
)
&&
_
.
map
(
questionOptionContentList
,
(
item
,
index
)
=>
{
_
.
map
(
questionOptionContentList
,
(
item
,
index
)
=>
{
item
.
content
=
item
.
content
.
replace
(
/<
\/?[^
>
]
*>/g
,
""
);
return
<
span
key=
{
index
}
>
{
item
.
content
}
</
span
>;
return
<
span
key=
{
index
}
>
{
item
.
content
}
</
span
>;
})
}
})
}
</
div
>
</
div
>
...
...
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