Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
image: () => {
const range = this.quill.getSelection();
const value = prompt("What is the image URL");
if (value) {
this.quill.insertEmbed(range.index, "image", value, ReactQuill.Quill.sources.USER);
}
},
},
protected onImagePick(url: string) {
const range = this.quill.getSelection() || { index: 0 };
const value = url;
if (value) {
this.quill.insertEmbed(range.index, "image", value, ReactQuill.Quill.sources.USER);
this.setState({ isUploadingImage: false });
}
}