Skip to content

Commit

Permalink
Fix #109
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Jan 7, 2015
1 parent 846fb30 commit aa111ee
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion js/bootstrap-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,22 @@
* ========================== */

var Markdown = function (element, options) {
// @TODO : remove this BC on next major release
// @see : https://github.com/toopay/bootstrap-markdown/issues/109
var opts = ['autofocus', 'savable', 'hideable', 'width', 'height', 'resize',
'language', 'footer', 'fullscreen', 'hiddenButtons', 'disabledButton'];
$.each(opts,function(_, opt){
if (typeof $(element).data(opt) !== 'undefined') {
options[opt] = $(element).data(opt)
}
});
// End BC

// Class Properties
this.$ns = 'bootstrap-markdown';
this.$element = $(element);
this.$editable = {el:null, type:null,attrKeys:[], attrValues:[], content:null};
this.$options = $.extend(true, {}, $.fn.markdown.defaults, options, this.$element.data(), this.$element.data('options'));
this.$options = $.extend(true, {}, $.fn.markdown.defaults, options, this.$element.data('options'));
this.$oldContent = null;
this.$isPreview = false;
this.$isFullscreen = false;
Expand Down

0 comments on commit aa111ee

Please sign in to comment.