-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dialogelfinder is not a function error #2
Comments
Your not including the function mediaDialog(id,t,c){
var fm=$('<div/>').dialogelfinder({
url:'<url path to the elfinder conector.php>',
lang:'en',
width:840,
height:450,
destroyOnClose:true,
getFileCallback:function(files,fm){
if(id>0){
$('#block').css({display:'block'});
$('#'+c).val(files.url);
$('#'+c+'image').attr('src',files.url);
update(id,t,c,files.url);
}else{
$('.summernote').summernote('editor.insertImage',files.url);
}
},
commandsOptions:{
getfile:{
oncomplete:'close',
folders:false
}
}
}).dialogelfinder('instance');
} |
hello @2braincells2go. My Bad, sorry for that. I think my readme file is not correct. So after i test it. these how the code should work. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css">
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.14/css/elfinder.full.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.14/js/elfinder.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.14/css/theme.min.css">
<script type="text/javascript" src="https://github.com/semplon/summernote-ext-elfinder/raw/master/summernote-ext-elfinder.js"></script>
<script type='text/javascript'>
$(function() {
$('#summernote').summernote({
height: 200,
tabsize: 2,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear']],
['insert', ['elfinder']]
]
});
});
function elfinderDialog() {
var fm = $('<div/>').dialogelfinder({
url : 'https://path.to/your/connector.php', // change with the url of your connector
lang : 'en',
width : 840,
height: 450,
destroyOnClose : true,
getFileCallback : function(files, fm) {
console.log(files);
$('.editor').summernote('editor.insertImage', files.url);
},
commandsOptions : {
getfile : {
oncomplete : 'close',
folders : false
}
}
}).dialogelfinder('instance');
}
</script> |
Thank you @StudioJunkyard and @semplon, much appreciated. After little rest, coffee and re-reading got it working. Cannot get the filemanager to insert image into summernote though. Filemanger opens, can see images, upload images and no errors in dev console. I am of course assuming filemanager is capable of inserting images with a click or drag? Woody |
Hi @2braincells2go it's should can insert the image. please capture the browser console. |
Nice CMS @semplon ! Looks like you running tinymce or ckeditor? Inserting image not working for me on summernote. Here is what I see: |
no @2braincells2go it's using summernote and elFinder. |
@semplon, that makes sense - looking at video did not look like summernote. Will download your cms and compare. Thank you much for input. |
@semplon I installed GeniXCMS, Nice CMS! I cannot locate where your elfinder connector file is? Like to inspect so can troubleshoot why I cannot insert images into my summernote. Cannot drag and drop or use insert. Thinking some type of permission error. Perhaps I can solve my issue by looking at your elfinder connector settings. Thanks again for help and input. |
hi @2braincells2go the connector is located at it's moved from default elfinder directory, so the directory had to be set. it's customized already, to fit with my cms. So to see how it works, you must compare with the i hope this can help thanks |
Have not gotten it working. Must be my setup (ie; using #summernote and also textarea verses div area). Going to close and try again later. Students will just have to live with default images for now. Thank you both for your help. |
Hi @semplon semplon , I followed below url for summernote-ext-elfinder.js:35 Uncaught ReferenceError: elfinderDialog is not defined I could not able to solve this issue , please help on this, When i click on file manager , i am getting above error i tried all possibilities. but no luck! Thanks for your help appreciated ! |
Hi. Thanks for the plugin, been looking for something like this for summernote.
After a few hours for trying and reading, cannot find a solution to error produced after click the "File Manager" button:
elfinder-callback.js:2 - Uncaught TypeError: $(...).dialogelfinder is not a function
I have tried all the way back to elfinder V2.1.9 and no change in error.
Here is my head layout just in case I have wrong:
Then my summernote config:
Have read the posts on stackoverflow and github, no luck in getting working. Any input/suggestions greatly appreciated.
Woody
The text was updated successfully, but these errors were encountered: