File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -928,7 +928,27 @@ $('#summernote').on('summernote.blur.codeview', function() {
928
928
{% endhighlight %}
929
929
930
930
### onImageLinkInsert
931
- WIP: Need to work on an explanation
931
+ Override insertion of image by url
932
+
933
+ {% highlight javascript %}
934
+ // onImageLinkInsert callback
935
+ $('#summernote').summernote({
936
+ callbacks: {
937
+ onImageLinkInsert: function(url) {
938
+ // url is the image url from the dialog
939
+ $img = $('<img >').attr({ src: url })
940
+ $summernote.summernote('insertNode', $img[ 0] );
941
+ }
942
+ }
943
+ });
944
+
945
+ // summernote.image.link.insert
946
+ $('#summernote').on('summernote.image.link.insert', function(we, url) {
947
+ // url is the image url from the dialog
948
+ $img = $('<img >').attr({ src: url })
949
+ $summernote.summernote('insertNode', $img[ 0] );
950
+ });
951
+ {% endhighlight %}
932
952
933
953
### onImageUpload
934
954
Override image upload handler(default: base64 dataURL on ` IMG ` tag).
You can’t perform that action at this time.
0 commit comments