Skip to content

Commit d7e64bc

Browse files
committed
Fixed options
1 parent 9337b14 commit d7e64bc

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

dist/js/bootstrap-markdown-editor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap-markdown-editor.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
var methods = {
77
init: function (options) {
88

9-
var defaults = $.extend({}, $.fn.markdownEditor.defaults, options),
9+
var defaults = $.extend(true, {}, $.fn.markdownEditor.defaults, options),
1010
plugin = this,
1111
preview = false,
1212
fullscreen = false;
@@ -365,6 +365,17 @@
365365
}
366366

367367
$.fn.markdownEditor.defaults = {
368+
width: '100%',
369+
height: '400px',
370+
fontSize: '14px',
371+
theme: 'tomorrow',
372+
fullscreen: true,
373+
imageUpload: false,
374+
uploadPath: '',
375+
preview: false,
376+
onPreview: function (content, callback) {
377+
callback(content);
378+
},
368379
label: {
369380
btnHeader1: 'Header 1',
370381
btnHeader2: 'Header 2',
@@ -378,18 +389,7 @@
378389
btnPreview: 'Preview',
379390
btnFullscreen: 'Fullscreen',
380391
loading: 'Loading'
381-
},
382-
theme: 'tomorrow',
383-
width: '100%',
384-
height: '400px',
385-
fontSize: '14px',
386-
preview: false,
387-
fullscreen: true,
388-
onPreview: function (content, callback) {
389-
callback(content);
390-
},
391-
imageUpload: false,
392-
uploadPath: '',
392+
}
393393
};
394394

395395
}(jQuery));

0 commit comments

Comments
 (0)