Skip to content

Commit

Permalink
extract image_upload_url from config file for add a custom upload url.
Browse files Browse the repository at this point in the history
  • Loading branch information
kumkao committed Aug 31, 2021
1 parent 553032e commit e78562c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions mdeditor/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"||", "preview", "watch", "fullscreen"],
'upload_image_formats': ["jpg", "JPG", "jpeg", "JPEG", "gif", "GIF", "png",
"PNG", "bmp", "BMP", "webp", "WEBP"],
'upload_image_url': '/mdeditor/uploads/',
'image_folder': 'editor',
'theme': 'default', # dark / default
'preview_theme': 'default', # dark / default
Expand Down
2 changes: 1 addition & 1 deletion mdeditor/templates/markdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
// image upload
imageUpload: true,
imageFormats: {{ config.upload_image_formats|safe }},
imageUploadURL: "/mdeditor/uploads/",
imageUploadURL: "{{ config.upload_image_url }}",
toolbarIcons: function () {
return {{ config.toolbar|safe }}
},
Expand Down

0 comments on commit e78562c

Please sign in to comment.