You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to write a froala editor on nextjs.
I'm currently studying, but I can't click the image upload button itself, so I wonder what the problem is. The byurl part of the Insert image works, but clicking on the upload image does not change anything
/* eslint-disable no-return-await *//* eslint-disable import/extensions */importdynamicfrom'next/dynamic';import'froala-editor/css/plugins/colors.min.css';// import 'froala-editor/js/plugins/image.min.js';constFroalaEditor=dynamic(async()=>{consteditorModule=awaitimport('react-froala-wysiwyg');awaitPromise.all([import('froala-editor/js/plugins/align.min.js'),import('froala-editor/js/plugins/font_size.min.js'),import('froala-editor/js/plugins/link.min.js'),import('froala-editor/js/plugins/file.min.js'),import('froala-editor/js/plugins/files_manager.min.js'),import('froala-editor/js/plugins/colors.min.js'),import('froala-editor/js/plugins/image.min.js'),// import('froala-editor/js/plugins/image_manager.min.js'),import('froala-editor/js/plugins/table.min.js'),]);returneditorModule;},{ssr: false});exportdefaultfunctionMyComponent({ content, setContent }){consthandleImageUpload=(e,editor,files)=>{console.log(files);e.preventDefault();};constconfig={pluginsEnabled: ['fontSize','image','imageManager','table','align','colors','emoticons','paragraphFormat','paragraphStyle','quote','url',],toolbarButtons: ['fontSize','colors','bold','italic','underline','strikeThrough','|','textColor','backgroundColor','|','alignLeft','alignCenter','alignRight','|','insertImage','insertTable','horizon','|','insertHR','insertFile','fileM',],fontSize: ['8','10','12','14','18','24','30','36','48','60','72','96',],fontSizeDefaultSelection: '12',fontFamily: {'Arial,Helvetica,sans-serif': 'Arial','Georgia,serif': 'Georgia','Impact,Charcoal,sans-serif': 'Impact','Tahoma,Geneva,sans-serif': 'Tahoma',"'Times New Roman',Times,serif": 'Times New Roman','Verdana,Geneva,sans-serif': 'Verdana',},fontFamilySelection: true,imageEditButtons: ['imageReplace','imageAlign','imageRemove','|','imageLink','linkOpen','linkEdit','linkRemove','-','imageDisplay','imageStyle','imageAlt','imageSize',],placeholderText: 'Edit Your Content Here!',imageInsertButtons: ['imageBack','|','imageUpload','imageByURL'],imageUploadMethod: 'POST',// Set the image upload URL.imageUploadURL: 'upload.php',imageManagerLoadURL: 'image_manager/load_images.php',// Set the image delete URL.imageManagerDeleteURL: 'delete_image.php',// ValidationimageAllowedTypes: ['jpeg','jpg','png'],// Set max image size to 10MB.imageMaxSize: 1024*1024*10,events: {'froalaEditor.image.beforeUpload': function(){console.log('digh');},},};return(<div><FroalaEditortag="textarea"model={content}onModelChange={(newContent)=>setContent(newContent)}config={config}/></div>);}
The text was updated successfully, but these errors were encountered:
I'm going to write a froala editor on nextjs.
I'm currently studying, but I can't click the image upload button itself, so I wonder what the problem is. The byurl part of the Insert image works, but clicking on the upload image does not change anything
The text was updated successfully, but these errors were encountered: