Summernote Image Upload

NOTE: This only applies to Summernote 0.6.* and not to newer versions.

height: 850,
toolbar: [

['style', ['fontsize','fontname','bold', 'italic', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph','hr','link','picture']],
onImageUpload: function(files, editor, welEditable) {
sendFile(files[0], editor, welEditable);

function sendFile(file, editor, welEditable) {
data = new FormData();
data.append("file", file);
data: data,
type: "POST",
url: "/admin/upload",
cache: false,
contentType: false,
processData: false,
success: function(url) {
$('#summernote').summernote('editor.insertImage', url);

Join the Discussion. Post a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: