Commit f39805dd by yuananting

fix:bug修复

parent 3f8abeb5
......@@ -119,6 +119,7 @@ class QuestionEditor extends Component {
editorRoot.config.zIndex = 999;
editorRoot.config.placeholder = "";
editorRoot.config.pasteFilterStyle = false;
editorRoot.config.focus = false;
// 自定义处理粘贴的文本内容
editorRoot.config.pasteTextHandle = function (content) {
if (content == "" && !content) return "";
......@@ -218,14 +219,10 @@ class QuestionEditor extends Component {
);
};
editorRoot.config.onblur = (html) => {
html = html.replace(/<(?!img|input).*?>/g, "");
html = html.replace(/\s+/g, "");
const conLen = html.length;
editorRoot.config.onblur = () => {
this.setState({
focusFlag: false,
visibleMediaBox: false,
visiblePlacehold: conLen === 0,
zIndex: 9,
});
};
......@@ -300,6 +297,7 @@ class QuestionEditor extends Component {
limitLength = 1000,
markKey,
} = this.props;
console.log("visiblePlacehold", visiblePlacehold)
return (
<div
className={`question-edtior_box question-edtior_box__${markKey}`}
......
......@@ -225,6 +225,7 @@ class QuestionPreviewModal extends Component {
)}
{["JUDGE"].includes(questionTypeEnum) &&
_.map(questionOptionContentList, (item, index) => {
item.content = item.content.replace(/<\/?[^>]*>/g, "");
return <span key={index}>{item.content}</span>;
})}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment