Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue with multiple instances on a page #209

Merged
merged 1 commit into from
Feb 18, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixing issue with multiple instances on a page
  • Loading branch information
weotch committed Feb 6, 2013
commit 4eb045ee66e1c3ec834cd04df1911eb59f3948ec
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