From 4eb045ee66e1c3ec834cd04df1911eb59f3948ec Mon Sep 17 00:00:00 2001 From: Robert Reinhard Date: Wed, 6 Feb 2013 12:24:38 -0800 Subject: [PATCH] Fixing issue with multiple instances on a page --- src/bootstrap-wysihtml5.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bootstrap-wysihtml5.js b/src/bootstrap-wysihtml5.js index 77d9095..e3b815e 100644 --- a/src/bootstrap-wysihtml5.js +++ b/src/bootstrap-wysihtml5.js @@ -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);