Merge branch 'dev_chen' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_chen
commit
196c40b2ea
@ -0,0 +1,103 @@
|
|||||||
|
import React,{ Component } from "react";
|
||||||
|
import {Checkbox,Radio, Input} from "antd";
|
||||||
|
import {DMDEditor,markdownToHTML, MarkdownToHtml } from 'educoder'
|
||||||
|
import QuillForEditor from "../../../../common/quillForEditor";
|
||||||
|
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
const tagArray = [
|
||||||
|
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
|
||||||
|
// 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
|
||||||
|
// 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
|
||||||
|
]
|
||||||
|
class Progques extends Component{
|
||||||
|
constructor(props){
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
toMDMode = (that) => {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onOptionContentChange = (value, index) => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onBlurEmpty=(index,number)=>{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render(){
|
||||||
|
let {
|
||||||
|
questionType ,
|
||||||
|
exercise ,
|
||||||
|
user_exercise_status,
|
||||||
|
is_md
|
||||||
|
}=this.props
|
||||||
|
let isAdmin = this.props.isAdmin();
|
||||||
|
let isStudent = this.props.isStudent();
|
||||||
|
let item=questionType;
|
||||||
|
let titename="";
|
||||||
|
if(item){
|
||||||
|
if(is_md===true){
|
||||||
|
titename=item.description;
|
||||||
|
}else{
|
||||||
|
try {
|
||||||
|
titename = JSON.parse(item.description);
|
||||||
|
}catch (e) {
|
||||||
|
titename={"ops":[{"insert":item.description}]};
|
||||||
|
}
|
||||||
|
// JSON.parse 有些异常数据是undefined
|
||||||
|
if(titename===undefined){
|
||||||
|
titename={"ops":[{"insert":item.description}]};
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// JSON.parse 转换的时候如果是数字字符串就转成整数了
|
||||||
|
if(titename>=0){
|
||||||
|
titename={"ops":[{"insert":item.description}]};
|
||||||
|
}
|
||||||
|
}catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return(
|
||||||
|
<div className="pl30 pr30">
|
||||||
|
<style>{`
|
||||||
|
.emptyPanel div#content_editorMd_show{
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
// height: 35px;
|
||||||
|
margin-top:0px;
|
||||||
|
background-color:#fafafa;
|
||||||
|
color:#999;
|
||||||
|
// line-height:25px;
|
||||||
|
}
|
||||||
|
.answerStyle{
|
||||||
|
background:#f5f5f5;
|
||||||
|
border-radius:4px;
|
||||||
|
border: 1px solid #eaeaea;
|
||||||
|
padding:5px;
|
||||||
|
min-height:35px;
|
||||||
|
box-sizing:border-box;
|
||||||
|
}
|
||||||
|
.emptyPanel .quill_editor_for_react_area{
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
|
<li className="df mb10 emptyPanel">
|
||||||
|
<QuillForEditor
|
||||||
|
readOnly={true}
|
||||||
|
value={titename}
|
||||||
|
showUploadImage={this.props.handleShowUploadImage}
|
||||||
|
/>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default Progques
|
Loading…
Reference in new issue