courseware
杨树林 5 years ago
parent 687c6a24fd
commit 6f12e3de09

@ -529,6 +529,7 @@ class Questionitem_banks extends Component {
} }
handleShowUploadImage=(url)=>{ handleShowUploadImage=(url)=>{
debugger
this.setState({ this.setState({
url:url url:url
}) })
@ -550,7 +551,7 @@ class Questionitem_banks extends Component {
> >
{url? {url?
<QuestionModalPicture {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture> <QuestionModalPicture url={url} {...this.props} {...this.state} handleClose={()=>this.handleClose()}></QuestionModalPicture>
: :
"" ""
} }

@ -176,7 +176,16 @@ class ChoquesEditor extends Component{
onCancel = () => { onCancel = () => {
this.props.onEditorCancel() this.props.onEditorCancel()
} }
handleShowUploadImages=(url)=>{
this.setState({
url:url,
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
handleShowUploadImage = (url,i) => { handleShowUploadImage = (url,i) => {
this.setState({ this.setState({
@ -466,6 +475,8 @@ class ChoquesEditor extends Component{
options={options} options={options}
value={question_title} value={question_title}
onContentChange={this.onContentChange} onContentChange={this.onContentChange}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/> />
@ -577,6 +588,7 @@ class ChoquesEditor extends Component{
options={options} options={options}
value={question_titles} value={question_titles}
onContentChange={this.onContentChanges} onContentChange={this.onContentChanges}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/> />

@ -58,6 +58,7 @@ class JudquestionEditor extends Component{
zqda:null, zqda:null,
item_banksedit:[], item_banksedit:[],
mychoicess:[], mychoicess:[],
url:''
} }
} }
addOption = () => { addOption = () => {
@ -334,6 +335,16 @@ class JudquestionEditor extends Component{
} }
} }
} }
handleShowUploadImages=(url)=>{
this.setState({
url:url,
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
onContentChanges=(value,quill)=>{ onContentChanges=(value,quill)=>{
const _text = quill.getText(); const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/; const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
@ -437,6 +448,8 @@ class JudquestionEditor extends Component{
options={options} options={options}
value={question_title} value={question_title}
onContentChange={this.onContentChange} onContentChange={this.onContentChange}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/> />
@ -487,6 +500,8 @@ class JudquestionEditor extends Component{
options={options} options={options}
value={question_titles} value={question_titles}
onContentChange={this.onContentChanges} onContentChange={this.onContentChanges}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/> />
</div> </div>

@ -251,6 +251,16 @@ class SingleEditor extends Component{
// standard_answers[index] = !standard_answers[index]; // standard_answers[index] = !standard_answers[index];
this.setState({ standard_answers }) this.setState({ standard_answers })
} }
handleShowUploadImages=(url)=>{
this.setState({
url:url,
})
try {
this.props.handleShowUploadImage(url)
}catch (e) {
}
}
handleShowUploadImage = (url,i) => { handleShowUploadImage = (url,i) => {
@ -494,6 +504,7 @@ class SingleEditor extends Component{
options={options} options={options}
value={question_title} value={question_title}
onContentChange={this.onContentChange} onContentChange={this.onContentChange}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/> />
<div className="mb10 mt10 sortinxdirection"> <div className="mb10 mt10 sortinxdirection">
@ -603,6 +614,7 @@ class SingleEditor extends Component{
options={options} options={options}
value={question_titles} value={question_titles}
onContentChange={this.onContentChanges} onContentChange={this.onContentChanges}
showUploadImage={(url)=>this.handleShowUploadImages(url)}
/> />
</div> </div>

Loading…
Cancel
Save