export class ImageSample extends SampleBase {
constructor() {
super(...arguments);
this.insertImageSetting = {
saveUrl: 'https://aspnetmvc.syncfusion.com/services/api/uploadbox/Save'
};
}
imageUploading(e) {
console.log('image uplaoding event called');
}
imageSelected() {
console.log('image selected event called');
}
render() {
return (<div className='control-pane'>
<div className='col-lg-8'>
<div className='control-section' id="rteAPI">
<div className='rte-control-section'>
<RichTextEditorComponent id="imageRTE" ref={(richtexteditor) => { this.rteObj = richtexteditor; }} insertImageSettings={this.insertImageSetting} imageUploading={this.imageUploading.bind(this)} imageSelected={this.imageSelected.bind(this)}>
<p>Rich Text Editor allows to insert images from online source as well as local computer where you want to insert the image in your content.</p>
<Inject services={[HtmlEditor, Toolbar, Image, Link, QuickToolbar]}/>
</RichTextEditorComponent>
</div>
</div>
</div>
</div>);
}
} |