Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/semplon/summernote-ext-elfinder
Summernote Plugin for elFinder File Manager
https://github.com/semplon/summernote-ext-elfinder
Last synced: 3 months ago
JSON representation
Summernote Plugin for elFinder File Manager
- Host: GitHub
- URL: https://github.com/semplon/summernote-ext-elfinder
- Owner: semplon
- License: mit
- Created: 2016-03-14T06:28:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T02:03:25.000Z (almost 5 years ago)
- Last Synced: 2024-02-15T07:33:57.092Z (9 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 24
- Watchers: 5
- Forks: 21
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-summernote - summernote-ext-elfinder
README
# Summernote Plugin elFinder
Summernote Plugin for elFinder File Manager## Installation
- Download plugin files. Extract it and copy into your summernote plugin directory.
- Include the summernote ext javascript file into your html page.```javascript
```- Initialize the plugin at your summernote initialization code.
```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');
}
```## Tested with
- Summernote : master branch (after v0.8.12)
- elFinder : 2.1.51
- Bootstrap : v3.4.1
- jQuery : 1.12.1
- jQuery-UI : 1.11.4## NOTE :
Don't forget to include the jQuery and jQuery-UI. The latest elFinder not include jquery-ui file.