Permalink
Browse files

Merge pull request #1 from andrewzielinski/master

A few small fixes
  • Loading branch information...
2 parents c6ce22c + f4d69e0 commit 5eafa53f77e6ae986bc3b130e4850a83cd77997b @mixonic committed Jan 27, 2012
Showing with 17 additions and 16 deletions.
  1. +16 −15 src/wysihat.js
  2. +1 −1 src/wysihat/header.js
View
@@ -1,8 +1,8 @@
+//= require "./wysihat/header"
//= require "./wysihat/dom/ierange"
//= require "./wysihat/dom/range"
//= require "./wysihat/dom/selection"
//= require "./wysihat/dom/bookmark"
-//= require "./wysihat/header"
//= require "./wysihat/editor"
//= require "./wysihat/features"
//= require "./wysihat/commands"
@@ -13,21 +13,22 @@
//= require "./wysihat/formatting"
//= require "./wysihat/toolbar"
-// Set wysihat as a jQuery plugin
-$.fn.wysihat = function(buttons) {
- buttons = typeof(buttons) == 'undefined' ? WysiHat.Toolbar.ButtonSets.Basic : buttons;
+(function($) {
+ // Set wysihat as a jQuery plugin
+ $.fn.wysihat = function(buttons) {
+ buttons = typeof(buttons) == 'undefined' ? WysiHat.Toolbar.ButtonSets.Basic : buttons;
- var result;
+ var result;
- this.each(function() {
- var $editor = WysiHat.Editor.attach($(this));
- var toolbar = new WysiHat.Toolbar($editor);
- toolbar.initialize($editor);
- toolbar.addButtonSet(buttons);
- $editor.toolbar = toolbar;
- if (result) result.add($editor); else result = $editor;
- });
+ this.each(function() {
+ var $editor = WysiHat.Editor.attach($(this));
+ var toolbar = new WysiHat.Toolbar($editor);
+ toolbar.initialize($editor);
+ toolbar.addButtonSet(buttons);
+ $editor.toolbar = toolbar;
+ if (result) result.add($editor); else result = $editor;
+ });
- return result;
-};
+ return result;
+ };
})(jQuery);
@@ -15,4 +15,4 @@
**/
var WysiHat = {};
-(function($) {
+

0 comments on commit 5eafa53

Please sign in to comment.