Skip to content

Commit 4eb045e

Browse files
committed
Fixing issue with multiple instances on a page
1 parent eb9b5cb commit 4eb045e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap-wysihtml5.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@
143143

144144
createEditor: function(options) {
145145
options = options || {};
146+
147+
// Add the toolbar to a clone of the options object so multiple instances
148+
// of the WYISYWG don't break because "toolbar" is already defined
149+
options = $.extend(true, {}, options);
146150
options.toolbar = this.toolbar[0];
147151

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

0 commit comments

Comments
 (0)