Skip to content

Commit

Permalink
Merge pull request jhollingworth#209 from weotch/patch-1
Browse files Browse the repository at this point in the history
Fixing issue with multiple instances on a page
  • Loading branch information
jhollingworth committed Feb 18, 2013
2 parents eb9b5cb + 4eb045e commit 70c2b0f
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 70c2b0f

Please sign in to comment.