bootsy 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07c76b46b43c59c11ae610157bb89a833de61fff
4
- data.tar.gz: a1fa27d625b2f313fdf30de95e94ea97b11f8862
3
+ metadata.gz: e3fa1e33cc474133f385772500c3f1c3c7c622d4
4
+ data.tar.gz: 477c5ad9e850218869fc3f68c93fed33ed90d045
5
5
  SHA512:
6
- metadata.gz: f826930f5425b4fcf2be6d85a4ac983a997b094b64d3afac82a0184d9a773835bef03262531b41c10225228ea37ffbe23f2c603ff1978bd0f2859ec4cdfb0202
7
- data.tar.gz: 51a5e794cebc1940982c7e1aa0e374a6013f38e1f27871ff00e923b723e83f5e29021ddfa9c68f28ea961e1af6fdcdb689cd50fb22eaf7b8f80f7804b24dd866
6
+ metadata.gz: 74a7ec62cbfb633d74b83d4c9e8ba97c74d1d605a2ca4b556acba3e4fad8b66d1d5548a3150196928ac26a96345dbc32ff38dd54c7d1f9e16ff15f194d7b016d
7
+ data.tar.gz: cc39af7ac32035dec2c52384d06d0aca6f40bca12926b89f8ee5b963e7282949cbb637854ac8d0eb067456efe0866c79334bf849be0faf09ea1f97d854ef8f0c
@@ -143,6 +143,10 @@
143
143
 
144
144
  createEditor: function(options) {
145
145
  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);
146
150
  options.toolbar = this.toolbar[0];
147
151
 
148
152
  var editor = new wysi.Editor(this.el[0], options);
@@ -266,7 +270,7 @@
266
270
  if (!activeButton) {
267
271
  self.editor.currentView.element.focus(false);
268
272
  caretBookmark = self.editor.composer.selection.getBookmark();
269
- insertImageModal.modal('show');
273
+ insertImageModal.appendTo('body').modal('show');
270
274
  insertImageModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
271
275
  e.stopPropagation();
272
276
  });
@@ -453,7 +457,10 @@
453
457
  }
454
458
  },
455
459
  "span": 1,
456
- "div": 1
460
+ "div": 1,
461
+ // to allow save and edit files with code tag hacks
462
+ "code": 1,
463
+ "pre": 1
457
464
  }
458
465
  },
459
466
  stylesheets: ["./lib/css/wysiwyg-color.css"], // (path_to_project/lib/css/wysiwyg-color.css)
@@ -74,13 +74,40 @@ window.Bootsy = (function(){
74
74
  Bootsy.editorOptions = {
75
75
  parserRules: {
76
76
  classes: {
77
+ "wysiwyg-color-silver" : 1,
78
+ "wysiwyg-color-gray" : 1,
79
+ "wysiwyg-color-white" : 1,
80
+ "wysiwyg-color-maroon" : 1,
81
+ "wysiwyg-color-red" : 1,
82
+ "wysiwyg-color-purple" : 1,
83
+ "wysiwyg-color-fuchsia" : 1,
84
+ "wysiwyg-color-green" : 1,
85
+ "wysiwyg-color-lime" : 1,
86
+ "wysiwyg-color-olive" : 1,
87
+ "wysiwyg-color-yellow" : 1,
88
+ "wysiwyg-color-navy" : 1,
89
+ "wysiwyg-color-blue" : 1,
90
+ "wysiwyg-color-teal" : 1,
91
+ "wysiwyg-color-aqua" : 1,
92
+ "wysiwyg-color-orange" : 1,
77
93
  "wysiwyg-float-left": 1,
78
94
  "wysiwyg-float-right": 1
79
95
  },
80
96
 
81
97
  tags: {
98
+ "b": {},
99
+ "i": {},
100
+ "br": {},
101
+ "ol": {},
102
+ "ul": {},
103
+ "li": {},
104
+ "h1": {},
105
+ "h2": {},
106
+ "h3": {},
82
107
  "small": {},
83
108
  "p": {},
109
+ "blockquote": {},
110
+ "u": 1,
84
111
  "cite": {
85
112
  "check_attributes": {
86
113
  "title": "alt"
@@ -88,12 +115,30 @@ window.Bootsy = (function(){
88
115
  },
89
116
  "img": {
90
117
  "check_attributes": {
91
- "src": "src"
118
+ "width": "numbers",
119
+ "alt": "alt",
120
+ "src": "src",
121
+ "height": "numbers"
92
122
  },
93
123
  "add_class": {
94
124
  "align": "align_img"
95
125
  }
96
126
  },
127
+
128
+ "a": {
129
+ set_attributes: {
130
+ target: "_blank",
131
+ rel: "nofollow"
132
+ },
133
+ check_attributes: {
134
+ href: "url" // important to avoid XSS
135
+ }
136
+ },
137
+ "span": 1,
138
+ "div": 1,
139
+ // to allow save and edit files with code tag hacks
140
+ "code": 1,
141
+ "pre": 1
97
142
  }
98
143
  },
99
144
  color: true,
@@ -1,3 +1,3 @@
1
1
  module Bootsy
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volmer Soares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-01 00:00:00.000000000 Z
11
+ date: 2013-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick