Skip to content

Commit

Permalink
Fixing issue with multiple instances on a page
Browse files Browse the repository at this point in the history
  • Loading branch information
weotch committed Feb 6, 2013
1 parent eb9b5cb commit 4eb045e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bootstrap-wysihtml5.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@

createEditor: function(options) {
options = options || {};

// Add the toolbar to a clone of the options object so multiple instances
// of the WYISYWG don't break because "toolbar" is already defined
options = $.extend(true, {}, options);
options.toolbar = this.toolbar[0];

var editor = new wysi.Editor(this.el[0], options);
Expand Down

0 comments on commit 4eb045e

Please sign in to comment.