summernote-rails 0.6.6.0 → 0.6.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +67 -10
- data/lib/summernote-rails/version.rb +1 -1
- data/vendor/assets/javascripts/summernote/locales/ko-KR.js +0 -1
- data/vendor/assets/javascripts/summernote/locales/pt-PT.js +96 -0
- data/vendor/assets/javascripts/summernote/plugin/summernote-ext-hint.js +253 -0
- data/vendor/assets/javascripts/summernote/summernote.js +176 -74
- data/vendor/assets/stylesheets/{summernote/summernote.css → summernote.css} +1 -1
- metadata +5 -4
- data/vendor/assets/stylesheets/summernote/index.css +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c02b349b30cb6166bfedc07dce5d0acae4e3bae
|
4
|
+
data.tar.gz: bee6ade51443ad9daf85e2be658a1e52cdf740ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 117085c2a7aa565af37a70dbc9b28eefbd0bcab17e91e1e3c10eca1c4f8ec0d536df1b5d2c487e1c283aa7c303c6bcaccaf0751740808eee8729e8db924b45d7
|
7
|
+
data.tar.gz: fcbbc94f20a79ba645c66177ec69cd32113a6cae2cf26b3976b37ef86efd39e1344d7113486fa740d4bee2b46ffa105e62564af5bd20f170ffa38a1ea0532cce
|
data/README.md
CHANGED
@@ -26,21 +26,25 @@ $ bundle install
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
-
In app/assets/stylesheets/application.
|
29
|
+
In app/assets/stylesheets/application.scss,
|
30
30
|
|
31
31
|
```css
|
32
|
-
|
33
|
-
|
32
|
+
@import "bootstrap";
|
33
|
+
@import "font-awesome";
|
34
|
+
@import "summernote";
|
34
35
|
```
|
35
36
|
|
36
|
-
In app/assets/javascripts/application.js, you should add
|
37
|
+
In app/assets/javascripts/application.js, you should add as follows:
|
37
38
|
|
38
39
|
```js
|
40
|
+
//= require ...
|
39
41
|
//= require bootstrap
|
40
42
|
//= require summernote
|
43
|
+
//= require ...
|
41
44
|
```
|
42
45
|
|
43
46
|
Basic Example:
|
47
|
+
|
44
48
|
```html
|
45
49
|
<div id="summernote">Hello Summernote</div>
|
46
50
|
|
@@ -50,10 +54,16 @@ Basic Example:
|
|
50
54
|
});
|
51
55
|
</script>
|
52
56
|
```
|
57
|
+
Or, if your want to use javascript with unobtrusive pattern, you can move the javascript script code lines to app/assets/javascripts/summernote_bootstraped.coffee as follows:
|
58
|
+
|
59
|
+
```coffee
|
60
|
+
$ ->
|
61
|
+
$('#summernote').summernote()
|
62
|
+
```
|
53
63
|
|
54
64
|
Ideally, you would do it like this:
|
55
65
|
|
56
|
-
```
|
66
|
+
```javscript
|
57
67
|
# This goes into your main javascript file. Customize as you need.
|
58
68
|
|
59
69
|
$('[data-provider="summernote"]').each(function(){
|
@@ -61,11 +71,31 @@ $('[data-provider="summernote"]').each(function(){
|
|
61
71
|
})
|
62
72
|
```
|
63
73
|
|
64
|
-
|
74
|
+
Or, if you want to code in coffeescript,
|
65
75
|
|
76
|
+
```coffeescript
|
77
|
+
$ ->
|
78
|
+
$('[data-provider="summernote"]').each ->
|
79
|
+
$(this).summernote()
|
66
80
|
```
|
67
|
-
|
81
|
+
|
82
|
+
Then, if you are using simple_form, you can use the `:summernote` input type. This type simply adds the `data-provider="summernote"` to the field.
|
83
|
+
|
84
|
+
```erb
|
85
|
+
<%= simple_form_for :example do | f | %>
|
86
|
+
...
|
87
|
+
<%= f.input :text, as: :summernote %>
|
88
|
+
...
|
89
|
+
<% end %>
|
90
|
+
```
|
91
|
+
|
92
|
+
Or, if you prefer haml-style,
|
93
|
+
|
94
|
+
```haml
|
95
|
+
= simple_form_for(:example) do | f |
|
96
|
+
...
|
68
97
|
= f.input :text, as: :summernote
|
98
|
+
...
|
69
99
|
```
|
70
100
|
|
71
101
|
If you are not using simple_form, then simply add the `data-provider="summernote"` to the input field yourself.
|
@@ -74,10 +104,12 @@ If you are not using simple_form, then simply add the `data-provider="summernote
|
|
74
104
|
|
75
105
|
If you use i18n, you have to include language files. In `app/assets/javascripts/application.js`, you should add the following:
|
76
106
|
|
77
|
-
```
|
107
|
+
```javascript
|
78
108
|
// load all locales
|
79
109
|
//= require summernote/locales
|
80
110
|
|
111
|
+
// or
|
112
|
+
|
81
113
|
// load specific locale(ko-KR)
|
82
114
|
//= require summernote/locales/ko-KR
|
83
115
|
```
|
@@ -96,16 +128,24 @@ and update summernote option
|
|
96
128
|
</script>
|
97
129
|
```
|
98
130
|
|
131
|
+
Also, you can move the above javascript code lines to app/assets/javascripts/summernote_bootstraped.coffee and add as follows:
|
132
|
+
|
133
|
+
```coffee
|
134
|
+
$ ->
|
135
|
+
$('#summernote').summernote
|
136
|
+
lang: 'ko-KR'
|
137
|
+
```
|
138
|
+
|
99
139
|
### Plugin
|
100
140
|
|
101
|
-
If you use
|
141
|
+
If you want to use a plugin, you have to include the corresponding file. In `app/assets/javascripts/application.js`, you should add the following:
|
102
142
|
|
103
143
|
```js
|
104
144
|
// load video plugin
|
105
145
|
//= require summernote/plugin/summernote-ext-video.js
|
106
146
|
```
|
107
147
|
|
108
|
-
and update summernote option
|
148
|
+
and update summernote option.
|
109
149
|
|
110
150
|
```html
|
111
151
|
<div id="summernote">Hello Summernote</div>
|
@@ -123,6 +163,23 @@ and update summernote option
|
|
123
163
|
</script>
|
124
164
|
```
|
125
165
|
|
166
|
+
Also, you can move the above javascript code lines to app/assets/javascripts/summernote_bootstraped.coffee and add as follows:
|
167
|
+
|
168
|
+
```coffee
|
169
|
+
$ ->
|
170
|
+
$('#summernote').summernote
|
171
|
+
toolbar : [
|
172
|
+
...
|
173
|
+
[
|
174
|
+
'group'
|
175
|
+
[
|
176
|
+
'video'
|
177
|
+
]
|
178
|
+
]
|
179
|
+
...
|
180
|
+
]
|
181
|
+
```
|
182
|
+
|
126
183
|
* [plugin example](https://github.com/summernote/summernote/blob/develop/examples/plugin-video.html)
|
127
184
|
|
128
185
|
|
@@ -0,0 +1,96 @@
|
|
1
|
+
(function ($) {
|
2
|
+
$.extend($.summernote.lang, {
|
3
|
+
'pt-PT': {
|
4
|
+
font: {
|
5
|
+
bold: 'Negrito',
|
6
|
+
italic: 'Itálico',
|
7
|
+
underline: 'Sublinhado',
|
8
|
+
clear: 'Remover estilo da fonte',
|
9
|
+
height: 'Altura da linha',
|
10
|
+
name: 'Fonte',
|
11
|
+
strikethrough: 'Riscado',
|
12
|
+
size: 'Tamanho da fonte'
|
13
|
+
},
|
14
|
+
image: {
|
15
|
+
image: 'Imagem',
|
16
|
+
insert: 'Inserir imagem',
|
17
|
+
resizeFull: 'Redimensionar Completo',
|
18
|
+
resizeHalf: 'Redimensionar Metade',
|
19
|
+
resizeQuarter: 'Redimensionar Um Quarto',
|
20
|
+
floatLeft: 'Float Esquerda',
|
21
|
+
floatRight: 'Float Direita',
|
22
|
+
floatNone: 'Sem Float',
|
23
|
+
dragImageHere: 'Arraste uma imagem para aqui',
|
24
|
+
selectFromFiles: 'Selecione a partir dos arquivos',
|
25
|
+
url: 'Endereço da imagem'
|
26
|
+
},
|
27
|
+
link: {
|
28
|
+
link: 'Link',
|
29
|
+
insert: 'Inserir ligação',
|
30
|
+
unlink: 'Remover ligação',
|
31
|
+
edit: 'Editar',
|
32
|
+
textToDisplay: 'Texto para exibir',
|
33
|
+
url: 'Que endereço esta licação leva?',
|
34
|
+
openInNewWindow: 'Abrir numa nova janela'
|
35
|
+
},
|
36
|
+
table: {
|
37
|
+
table: 'Tabela'
|
38
|
+
},
|
39
|
+
hr: {
|
40
|
+
insert: 'Inserir linha horizontal'
|
41
|
+
},
|
42
|
+
style: {
|
43
|
+
style: 'Estilo',
|
44
|
+
normal: 'Normal',
|
45
|
+
blockquote: 'Citação',
|
46
|
+
pre: 'Código',
|
47
|
+
h1: 'Título 1',
|
48
|
+
h2: 'Título 2',
|
49
|
+
h3: 'Título 3',
|
50
|
+
h4: 'Título 4',
|
51
|
+
h5: 'Título 5',
|
52
|
+
h6: 'Título 6'
|
53
|
+
},
|
54
|
+
lists: {
|
55
|
+
unordered: 'Lista com marcadores',
|
56
|
+
ordered: 'Lista numerada'
|
57
|
+
},
|
58
|
+
options: {
|
59
|
+
help: 'Ajuda',
|
60
|
+
fullscreen: 'Janela Completa',
|
61
|
+
codeview: 'Ver código-fonte'
|
62
|
+
},
|
63
|
+
paragraph: {
|
64
|
+
paragraph: 'Parágrafo',
|
65
|
+
outdent: 'Menor tabulação',
|
66
|
+
indent: 'Maior tabulação',
|
67
|
+
left: 'Alinhar à esquerda',
|
68
|
+
center: 'Alinhar ao centro',
|
69
|
+
right: 'Alinha à direita',
|
70
|
+
justify: 'Justificado'
|
71
|
+
},
|
72
|
+
color: {
|
73
|
+
recent: 'Cor recente',
|
74
|
+
more: 'Mais cores',
|
75
|
+
background: 'Fundo',
|
76
|
+
foreground: 'Fonte',
|
77
|
+
transparent: 'Transparente',
|
78
|
+
setTransparent: 'Fundo transparente',
|
79
|
+
reset: 'Restaurar',
|
80
|
+
resetToDefault: 'Restaurar padrão'
|
81
|
+
},
|
82
|
+
shortcut: {
|
83
|
+
shortcuts: 'Atalhos do teclado',
|
84
|
+
close: 'Fechar',
|
85
|
+
textFormatting: 'Formatação de texto',
|
86
|
+
action: 'Ação',
|
87
|
+
paragraphFormatting: 'Formatação de parágrafo',
|
88
|
+
documentStyle: 'Estilo de documento'
|
89
|
+
},
|
90
|
+
history: {
|
91
|
+
undo: 'Desfazer',
|
92
|
+
redo: 'Refazer'
|
93
|
+
}
|
94
|
+
}
|
95
|
+
});
|
96
|
+
})(jQuery);
|
@@ -0,0 +1,253 @@
|
|
1
|
+
(function (factory) {
|
2
|
+
/* global define */
|
3
|
+
if (typeof define === 'function' && define.amd) {
|
4
|
+
// AMD. Register as an anonymous module.
|
5
|
+
define(['jquery'], factory);
|
6
|
+
} else {
|
7
|
+
// Browser globals: jQuery
|
8
|
+
factory(window.jQuery);
|
9
|
+
}
|
10
|
+
}(function ($) {
|
11
|
+
var range = $.summernote.core.range;
|
12
|
+
var list = $.summernote.core.list;
|
13
|
+
|
14
|
+
var KEY = {
|
15
|
+
UP: 38,
|
16
|
+
DOWN: 40,
|
17
|
+
ENTER: 13
|
18
|
+
};
|
19
|
+
|
20
|
+
var DROPDOWN_KEYCODES = [38, 40, 13];
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @class plugin.hint
|
24
|
+
*
|
25
|
+
* Hello Plugin
|
26
|
+
*/
|
27
|
+
$.summernote.addPlugin({
|
28
|
+
/** @property {String} name name of plugin */
|
29
|
+
name: 'hint',
|
30
|
+
|
31
|
+
/**
|
32
|
+
* @param {jQuery} $node
|
33
|
+
*/
|
34
|
+
scrollTo: function ($node) {
|
35
|
+
var $parent = $node.parent();
|
36
|
+
$parent[0].scrollTop = $node[0].offsetTop - ($parent.innerHeight() / 2);
|
37
|
+
},
|
38
|
+
|
39
|
+
/**
|
40
|
+
* @param {jQuery} $popover
|
41
|
+
*/
|
42
|
+
moveDown: function ($popover) {
|
43
|
+
var index = $popover.find('.active').index();
|
44
|
+
this.activate($popover, (index === -1) ? 0 : (index + 1) % $popover.children().length);
|
45
|
+
},
|
46
|
+
|
47
|
+
/**
|
48
|
+
* @param {jQuery} $popover
|
49
|
+
*/
|
50
|
+
moveUp: function ($popover) {
|
51
|
+
var index = $popover.find('.active').index();
|
52
|
+
this.activate($popover, (index === -1) ? 0 : (index - 1) % $popover.children().length);
|
53
|
+
},
|
54
|
+
|
55
|
+
/**
|
56
|
+
* @param {jQuery} $popover
|
57
|
+
* @param {Number} i
|
58
|
+
*/
|
59
|
+
activate: function ($popover, idx) {
|
60
|
+
idx = idx || 0;
|
61
|
+
|
62
|
+
if (idx < 0) {
|
63
|
+
idx = $popover.children().length - 1;
|
64
|
+
}
|
65
|
+
|
66
|
+
$popover.children().removeClass('active');
|
67
|
+
var $activeItem = $popover.children().eq(idx);
|
68
|
+
$activeItem.addClass('active');
|
69
|
+
|
70
|
+
this.scrollTo($activeItem);
|
71
|
+
},
|
72
|
+
|
73
|
+
/**
|
74
|
+
* @param {jQuery} $popover
|
75
|
+
*/
|
76
|
+
replace: function ($popover) {
|
77
|
+
var wordRange = $popover.data('wordRange');
|
78
|
+
var $activeItem = $popover.find('.active');
|
79
|
+
var content = this.content($activeItem.html(), $activeItem.data('keyword'));
|
80
|
+
|
81
|
+
if (typeof content === 'string') {
|
82
|
+
content = document.createTextNode(content);
|
83
|
+
}
|
84
|
+
|
85
|
+
$popover.removeData('wordRange');
|
86
|
+
|
87
|
+
wordRange.insertNode(content);
|
88
|
+
range.createFromNode(content).collapse().select();
|
89
|
+
},
|
90
|
+
|
91
|
+
/**
|
92
|
+
* @param {String} keyword
|
93
|
+
* @return {Object|null}
|
94
|
+
*/
|
95
|
+
searchKeyword: function (keyword) {
|
96
|
+
var triggerChar = keyword.charAt(0);
|
97
|
+
|
98
|
+
if (triggerChar === ':' && keyword.length > 1) {
|
99
|
+
var trigger = keyword.toLowerCase().replace(':', '');
|
100
|
+
return {
|
101
|
+
type: 'emoji',
|
102
|
+
list: $.grep(this.emojiKeys, function (item) {
|
103
|
+
return item.indexOf(trigger) === 0;
|
104
|
+
})
|
105
|
+
};
|
106
|
+
}
|
107
|
+
|
108
|
+
return null;
|
109
|
+
},
|
110
|
+
|
111
|
+
/**
|
112
|
+
* create items
|
113
|
+
*
|
114
|
+
* @param {Object} searchResult
|
115
|
+
* @param {String} searchResult.type
|
116
|
+
* @param {String[]} searchResult.list
|
117
|
+
* @return {jQuery[]}
|
118
|
+
*/
|
119
|
+
createItems: function (searchResult) {
|
120
|
+
var items = [];
|
121
|
+
var list = searchResult.list;
|
122
|
+
|
123
|
+
for (var i = 0, len = list.length; i < len; i++) {
|
124
|
+
var $item = $('<a class="list-group-item"></a>');
|
125
|
+
$item.append(this.createItem(list[i]));
|
126
|
+
$item.data('keyword', list[i]);
|
127
|
+
items.push($item);
|
128
|
+
}
|
129
|
+
|
130
|
+
if (items.length) {
|
131
|
+
items[0].addClass('active');
|
132
|
+
}
|
133
|
+
|
134
|
+
return items;
|
135
|
+
},
|
136
|
+
|
137
|
+
/**
|
138
|
+
* create list item template
|
139
|
+
*
|
140
|
+
* @param {Object} item
|
141
|
+
* @returns {String}
|
142
|
+
*/
|
143
|
+
createItem: function (item) {
|
144
|
+
var content = this.emojiInfo[item];
|
145
|
+
return '<img src="' + content + '" width="20" /> :' + item + ':';
|
146
|
+
},
|
147
|
+
|
148
|
+
/**
|
149
|
+
* create inserted content to add in summernote
|
150
|
+
*
|
151
|
+
* @param {String} html
|
152
|
+
* @param {String} keyword
|
153
|
+
* @return {Node|String}
|
154
|
+
*/
|
155
|
+
content: function (html, item) {
|
156
|
+
var url = this.emojiInfo[item];
|
157
|
+
|
158
|
+
if (url) {
|
159
|
+
var $img = $('<img />').attr('src', url).css({
|
160
|
+
width : 20
|
161
|
+
});
|
162
|
+
return $img[0];
|
163
|
+
}
|
164
|
+
|
165
|
+
return html;
|
166
|
+
},
|
167
|
+
|
168
|
+
/**
|
169
|
+
* @return {Promise}
|
170
|
+
*/
|
171
|
+
loadEmojis: function () {
|
172
|
+
var self = this;
|
173
|
+
return $.getJSON('https://api.github.com/emojis').then(function (data) {
|
174
|
+
self.emojiKeys = Object.keys(data);
|
175
|
+
self.emojiInfo = data;
|
176
|
+
});
|
177
|
+
},
|
178
|
+
|
179
|
+
init: function (layoutInfo) {
|
180
|
+
var self = this;
|
181
|
+
|
182
|
+
var $note = layoutInfo.holder();
|
183
|
+
var $popover = $('<div class="list-group" />').css({
|
184
|
+
position: 'absolute',
|
185
|
+
'max-height': 300,
|
186
|
+
'overflow-y': 'scroll',
|
187
|
+
'display': 'none'
|
188
|
+
});
|
189
|
+
|
190
|
+
// FIXME We need a handler for unload resources.
|
191
|
+
$popover.on('click', '.list-group-item', function () {
|
192
|
+
self.replace($popover);
|
193
|
+
|
194
|
+
$popover.hide();
|
195
|
+
$note.summernote('focus');
|
196
|
+
});
|
197
|
+
|
198
|
+
$(document).on('click', function () {
|
199
|
+
$popover.hide();
|
200
|
+
});
|
201
|
+
|
202
|
+
$note.on('summernote.keydown', function (customEvent, nativeEvent) {
|
203
|
+
if ($popover.css('display') !== 'block') {
|
204
|
+
return;
|
205
|
+
}
|
206
|
+
|
207
|
+
if (nativeEvent.keyCode === KEY.DOWN) {
|
208
|
+
nativeEvent.preventDefault();
|
209
|
+
self.moveDown($popover);
|
210
|
+
} else if (nativeEvent.keyCode === KEY.UP) {
|
211
|
+
nativeEvent.preventDefault();
|
212
|
+
self.moveUp($popover);
|
213
|
+
} else if (nativeEvent.keyCode === KEY.ENTER) {
|
214
|
+
nativeEvent.preventDefault();
|
215
|
+
self.replace($popover);
|
216
|
+
|
217
|
+
$popover.hide();
|
218
|
+
$note.summernote('focus');
|
219
|
+
}
|
220
|
+
});
|
221
|
+
|
222
|
+
$note.on('summernote.keyup', function (customEvent, nativeEvent) {
|
223
|
+
if (DROPDOWN_KEYCODES.indexOf(nativeEvent.keyCode) === -1) {
|
224
|
+
var wordRange = $(this).summernote('createRange').getWordRange();
|
225
|
+
var result = self.searchKeyword(wordRange.toString());
|
226
|
+
if (!result || !result.list.length) {
|
227
|
+
$popover.hide();
|
228
|
+
return;
|
229
|
+
}
|
230
|
+
|
231
|
+
layoutInfo.popover().append($popover);
|
232
|
+
|
233
|
+
var rect = list.last(wordRange.getClientRects());
|
234
|
+
$popover.html(self.createItems(result)).css({
|
235
|
+
left: rect.left,
|
236
|
+
top: rect.top + rect.height
|
237
|
+
}).data('wordRange', wordRange).show();
|
238
|
+
}
|
239
|
+
});
|
240
|
+
|
241
|
+
this.loadEmojis();
|
242
|
+
},
|
243
|
+
|
244
|
+
// FIXME Summernote doesn't support event pipeline yet.
|
245
|
+
// - Plugin -> Base Code
|
246
|
+
events: {
|
247
|
+
ENTER: function () {
|
248
|
+
// prevent ENTER key
|
249
|
+
return false;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
});
|
253
|
+
}));
|
@@ -1,12 +1,12 @@
|
|
1
1
|
/**
|
2
|
-
* Super simple wysiwyg editor on Bootstrap v0.6.
|
2
|
+
* Super simple wysiwyg editor on Bootstrap v0.6.7
|
3
3
|
* http://summernote.org/
|
4
4
|
*
|
5
5
|
* summernote.js
|
6
6
|
* Copyright 2013-2015 Alan Hong. and other contributors
|
7
7
|
* summernote may be freely distributed under the MIT license./
|
8
8
|
*
|
9
|
-
* Date: 2015-
|
9
|
+
* Date: 2015-05-17T06:58Z
|
10
10
|
*/
|
11
11
|
(function (factory) {
|
12
12
|
/* global define */
|
@@ -105,6 +105,8 @@
|
|
105
105
|
return originalWidth !== width;
|
106
106
|
};
|
107
107
|
|
108
|
+
var userAgent = navigator.userAgent;
|
109
|
+
|
108
110
|
/**
|
109
111
|
* @class core.agent
|
110
112
|
*
|
@@ -117,9 +119,12 @@
|
|
117
119
|
/** @property {Boolean} [isMac=false] true if this agent is Mac */
|
118
120
|
isMac: navigator.appVersion.indexOf('Mac') > -1,
|
119
121
|
/** @property {Boolean} [isMSIE=false] true if this agent is a Internet Explorer */
|
120
|
-
isMSIE:
|
122
|
+
isMSIE: /MSIE|Trident/i.test(userAgent),
|
121
123
|
/** @property {Boolean} [isFF=false] true if this agent is a Firefox */
|
122
|
-
isFF:
|
124
|
+
isFF: /firefox/i.test(userAgent),
|
125
|
+
isWebkit: /webkit/i.test(userAgent),
|
126
|
+
/** @property {Boolean} [isSafari=false] true if this agent is a Safari */
|
127
|
+
isSafari: /safari/i.test(userAgent),
|
123
128
|
/** @property {String} jqueryVersion current jQuery version string */
|
124
129
|
jqueryVersion: parseFloat($.fn.jquery),
|
125
130
|
isSupportAmd: isSupportAmd,
|
@@ -704,9 +709,12 @@
|
|
704
709
|
|
705
710
|
if (len === 0) {
|
706
711
|
return true;
|
707
|
-
} else if (!
|
712
|
+
} else if (!isText(node) && len === 1 && node.innerHTML === blankHTML) {
|
708
713
|
// ex) <p><br></p>, <span><br></span>
|
709
714
|
return true;
|
715
|
+
} else if (list.all(node.childNodes, isText) && node.innerHTML === '') {
|
716
|
+
// ex) <p></p>, <span></span>
|
717
|
+
return true;
|
710
718
|
}
|
711
719
|
|
712
720
|
return false;
|
@@ -2128,7 +2136,7 @@
|
|
2128
2136
|
if (!arguments.length) { // from Browser Selection
|
2129
2137
|
if (agent.isW3CRangeSupport) {
|
2130
2138
|
var selection = document.getSelection();
|
2131
|
-
if (selection.rangeCount === 0) {
|
2139
|
+
if (!selection || selection.rangeCount === 0) {
|
2132
2140
|
return null;
|
2133
2141
|
} else if (dom.isBody(selection.anchorNode)) {
|
2134
2142
|
// Firefox: returns entire body as range on initialization. We won't never need it.
|
@@ -2199,6 +2207,26 @@
|
|
2199
2207
|
return this.create(sc, so, ec, eo);
|
2200
2208
|
},
|
2201
2209
|
|
2210
|
+
/**
|
2211
|
+
* create WrappedRange from node after position
|
2212
|
+
*
|
2213
|
+
* @param {Node} node
|
2214
|
+
* @return {WrappedRange}
|
2215
|
+
*/
|
2216
|
+
createFromNodeBefore: function (node) {
|
2217
|
+
return this.createFromNode(node).collapse(true);
|
2218
|
+
},
|
2219
|
+
|
2220
|
+
/**
|
2221
|
+
* create WrappedRange from node after position
|
2222
|
+
*
|
2223
|
+
* @param {Node} node
|
2224
|
+
* @return {WrappedRange}
|
2225
|
+
*/
|
2226
|
+
createFromNodeAfter: function (node) {
|
2227
|
+
return this.createFromNode(node).collapse();
|
2228
|
+
},
|
2229
|
+
|
2202
2230
|
/**
|
2203
2231
|
* @method
|
2204
2232
|
*
|
@@ -2243,7 +2271,7 @@
|
|
2243
2271
|
*/
|
2244
2272
|
var defaults = {
|
2245
2273
|
/** @property */
|
2246
|
-
version: '0.6.
|
2274
|
+
version: '0.6.7',
|
2247
2275
|
|
2248
2276
|
/**
|
2249
2277
|
*
|
@@ -2308,7 +2336,7 @@
|
|
2308
2336
|
['font', ['bold', 'italic', 'underline', 'clear']],
|
2309
2337
|
// ['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear']],
|
2310
2338
|
['fontname', ['fontname']],
|
2311
|
-
|
2339
|
+
['fontsize', ['fontsize']],
|
2312
2340
|
['color', ['color']],
|
2313
2341
|
['para', ['ul', 'ol', 'paragraph']],
|
2314
2342
|
['height', ['height']],
|
@@ -2318,6 +2346,8 @@
|
|
2318
2346
|
['help', ['help']]
|
2319
2347
|
],
|
2320
2348
|
|
2349
|
+
plugin : { },
|
2350
|
+
|
2321
2351
|
// air mode: inline editor
|
2322
2352
|
airMode: false,
|
2323
2353
|
// airPopover: [
|
@@ -2698,6 +2728,15 @@
|
|
2698
2728
|
isEdit: function (keyCode) {
|
2699
2729
|
return list.contains([8, 9, 13, 32], keyCode);
|
2700
2730
|
},
|
2731
|
+
/**
|
2732
|
+
* @method isMove
|
2733
|
+
*
|
2734
|
+
* @param {Number} keyCode
|
2735
|
+
* @return {Boolean}
|
2736
|
+
*/
|
2737
|
+
isMove: function (keyCode) {
|
2738
|
+
return list.contains([37, 38, 39, 40], keyCode);
|
2739
|
+
},
|
2701
2740
|
/**
|
2702
2741
|
* @property {Object} nameFromCode
|
2703
2742
|
* @property {String} nameFromCode.8 "BACKSPACE"
|
@@ -2838,7 +2877,7 @@
|
|
2838
2877
|
var onlyPartialContains = !!(options && options.onlyPartialContains);
|
2839
2878
|
|
2840
2879
|
if (rng.isCollapsed()) {
|
2841
|
-
return rng.insertNode(dom.create(nodeName));
|
2880
|
+
return [rng.insertNode(dom.create(nodeName))];
|
2842
2881
|
}
|
2843
2882
|
|
2844
2883
|
var pred = dom.makePredByNodeName(nodeName);
|
@@ -3272,6 +3311,9 @@
|
|
3272
3311
|
};
|
3273
3312
|
};
|
3274
3313
|
|
3314
|
+
|
3315
|
+
var KEY_BOGUS = 'bogus';
|
3316
|
+
|
3275
3317
|
/**
|
3276
3318
|
* @class editing.Editor
|
3277
3319
|
*
|
@@ -3294,7 +3336,7 @@
|
|
3294
3336
|
* @return {WrappedRange}
|
3295
3337
|
*/
|
3296
3338
|
this.createRange = function ($editable) {
|
3297
|
-
|
3339
|
+
this.focus($editable);
|
3298
3340
|
return range.create();
|
3299
3341
|
};
|
3300
3342
|
|
@@ -3307,7 +3349,7 @@
|
|
3307
3349
|
* @param {Boolean} [thenCollapse=false]
|
3308
3350
|
*/
|
3309
3351
|
this.saveRange = function ($editable, thenCollapse) {
|
3310
|
-
|
3352
|
+
this.focus($editable);
|
3311
3353
|
$editable.data('range', range.create());
|
3312
3354
|
if (thenCollapse) {
|
3313
3355
|
range.create().collapse().select();
|
@@ -3341,7 +3383,7 @@
|
|
3341
3383
|
var rng = $editable.data('range');
|
3342
3384
|
if (rng) {
|
3343
3385
|
rng.select();
|
3344
|
-
|
3386
|
+
this.focus($editable);
|
3345
3387
|
}
|
3346
3388
|
};
|
3347
3389
|
|
@@ -3408,6 +3450,7 @@
|
|
3408
3450
|
triggerOnChange($editable);
|
3409
3451
|
};
|
3410
3452
|
|
3453
|
+
var self = this;
|
3411
3454
|
/**
|
3412
3455
|
* @method beforeCommand
|
3413
3456
|
* before command
|
@@ -3415,6 +3458,8 @@
|
|
3415
3458
|
*/
|
3416
3459
|
var beforeCommand = this.beforeCommand = function ($editable) {
|
3417
3460
|
triggerOnBeforeChange($editable);
|
3461
|
+
// keep focus on editable before command execution
|
3462
|
+
self.focus($editable);
|
3418
3463
|
};
|
3419
3464
|
|
3420
3465
|
/**
|
@@ -3564,7 +3609,7 @@
|
|
3564
3609
|
* @param {Object} options
|
3565
3610
|
*/
|
3566
3611
|
this.tab = function ($editable, options) {
|
3567
|
-
var rng =
|
3612
|
+
var rng = this.createRange($editable);
|
3568
3613
|
if (rng.isCollapsed() && rng.isOnCell()) {
|
3569
3614
|
table.tab(rng);
|
3570
3615
|
} else {
|
@@ -3580,8 +3625,8 @@
|
|
3580
3625
|
* handle shift+tab key
|
3581
3626
|
*
|
3582
3627
|
*/
|
3583
|
-
this.untab = function () {
|
3584
|
-
var rng =
|
3628
|
+
this.untab = function ($editable) {
|
3629
|
+
var rng = this.createRange($editable);
|
3585
3630
|
if (rng.isCollapsed() && rng.isOnCell()) {
|
3586
3631
|
table.tab(rng, true);
|
3587
3632
|
}
|
@@ -3652,13 +3697,13 @@
|
|
3652
3697
|
width: Math.min($editable.width(), $image.width())
|
3653
3698
|
});
|
3654
3699
|
range.create().insertNode($image[0]);
|
3655
|
-
range.
|
3700
|
+
range.createFromNodeAfter($image[0]).select();
|
3656
3701
|
afterCommand($editable);
|
3657
3702
|
}).fail(function () {
|
3658
|
-
var
|
3659
|
-
|
3660
|
-
|
3661
|
-
|
3703
|
+
var $holder = dom.makeLayoutInfo($editable).holder();
|
3704
|
+
handler.bindCustomEvent(
|
3705
|
+
$holder, $editable.data('callbacks'), 'image.upload.error'
|
3706
|
+
)();
|
3662
3707
|
});
|
3663
3708
|
};
|
3664
3709
|
|
@@ -3670,9 +3715,8 @@
|
|
3670
3715
|
*/
|
3671
3716
|
this.insertNode = function ($editable, node) {
|
3672
3717
|
beforeCommand($editable);
|
3673
|
-
|
3674
|
-
|
3675
|
-
range.createFromNode(node).collapse().select();
|
3718
|
+
range.create().insertNode(node);
|
3719
|
+
range.createFromNodeAfter(node).select();
|
3676
3720
|
afterCommand($editable);
|
3677
3721
|
};
|
3678
3722
|
|
@@ -3683,8 +3727,7 @@
|
|
3683
3727
|
*/
|
3684
3728
|
this.insertText = function ($editable, text) {
|
3685
3729
|
beforeCommand($editable);
|
3686
|
-
var
|
3687
|
-
var textNode = rng.insertNode(dom.createText(text));
|
3730
|
+
var textNode = range.create().insertNode(dom.createText(text));
|
3688
3731
|
range.create(textNode, dom.nodeLength(textNode)).select();
|
3689
3732
|
afterCommand($editable);
|
3690
3733
|
};
|
@@ -3696,9 +3739,8 @@
|
|
3696
3739
|
*/
|
3697
3740
|
this.pasteHTML = function ($editable, markup) {
|
3698
3741
|
beforeCommand($editable);
|
3699
|
-
var
|
3700
|
-
|
3701
|
-
range.createFromNode(list.last(contents)).collapse().select();
|
3742
|
+
var contents = range.create().pasteHTML(markup);
|
3743
|
+
range.createFromNodeAfter(list.last(contents)).select();
|
3702
3744
|
afterCommand($editable);
|
3703
3745
|
};
|
3704
3746
|
|
@@ -3739,17 +3781,54 @@
|
|
3739
3781
|
* @param {String} value - px
|
3740
3782
|
*/
|
3741
3783
|
this.fontSize = function ($editable, value) {
|
3742
|
-
|
3784
|
+
var rng = range.create();
|
3785
|
+
var isCollapsed = rng.isCollapsed();
|
3743
3786
|
|
3744
|
-
|
3745
|
-
|
3746
|
-
|
3747
|
-
|
3787
|
+
if (isCollapsed) {
|
3788
|
+
var spans = style.styleNodes(rng);
|
3789
|
+
var firstSpan = list.head(spans);
|
3790
|
+
|
3791
|
+
$(spans).css({
|
3748
3792
|
'font-size': value + 'px'
|
3749
3793
|
});
|
3750
|
-
});
|
3751
3794
|
|
3752
|
-
|
3795
|
+
// [workaround] added styled bogus span for style
|
3796
|
+
// - also bogus character needed for cursor position
|
3797
|
+
if (firstSpan && !dom.nodeLength(firstSpan)) {
|
3798
|
+
firstSpan.innerHTML = dom.ZERO_WIDTH_NBSP_CHAR;
|
3799
|
+
range.createFromNodeAfter(firstSpan.firstChild).select();
|
3800
|
+
$editable.data(KEY_BOGUS, firstSpan);
|
3801
|
+
}
|
3802
|
+
} else {
|
3803
|
+
beforeCommand($editable);
|
3804
|
+
$(style.styleNodes(rng)).css({
|
3805
|
+
'font-size': value + 'px'
|
3806
|
+
});
|
3807
|
+
afterCommand($editable);
|
3808
|
+
}
|
3809
|
+
};
|
3810
|
+
|
3811
|
+
/**
|
3812
|
+
* remove bogus node and character
|
3813
|
+
*/
|
3814
|
+
this.removeBogus = function ($editable) {
|
3815
|
+
var bogusNode = $editable.data(KEY_BOGUS);
|
3816
|
+
if (!bogusNode) {
|
3817
|
+
return;
|
3818
|
+
}
|
3819
|
+
|
3820
|
+
var textNode = list.find(list.from(bogusNode.childNodes), dom.isText);
|
3821
|
+
|
3822
|
+
var bogusCharIdx = textNode.nodeValue.indexOf(dom.ZERO_WIDTH_NBSP_CHAR);
|
3823
|
+
if (bogusCharIdx !== -1) {
|
3824
|
+
textNode.deleteData(bogusCharIdx, 1);
|
3825
|
+
}
|
3826
|
+
|
3827
|
+
if (dom.isEmpty(bogusNode)) {
|
3828
|
+
dom.remove(bogusNode);
|
3829
|
+
}
|
3830
|
+
|
3831
|
+
$editable.removeData(KEY_BOGUS);
|
3753
3832
|
};
|
3754
3833
|
|
3755
3834
|
/**
|
@@ -3773,7 +3852,7 @@
|
|
3773
3852
|
* @param {jQuery} $editable
|
3774
3853
|
*/
|
3775
3854
|
this.unlink = function ($editable) {
|
3776
|
-
var rng =
|
3855
|
+
var rng = this.createRange();
|
3777
3856
|
if (rng.isOnAnchor()) {
|
3778
3857
|
var anchor = dom.ancestor(rng.sc, dom.isAnchor);
|
3779
3858
|
rng = range.createFromNode(anchor);
|
@@ -3805,11 +3884,11 @@
|
|
3805
3884
|
linkUrl = options.onCreateLink(linkUrl);
|
3806
3885
|
}
|
3807
3886
|
|
3808
|
-
var anchors;
|
3887
|
+
var anchors = [];
|
3809
3888
|
if (isTextChanged) {
|
3810
3889
|
// Create a new link when text changed.
|
3811
3890
|
var anchor = rng.insertNode($('<A>' + linkText + '</A>')[0]);
|
3812
|
-
anchors
|
3891
|
+
anchors.push(anchor);
|
3813
3892
|
} else {
|
3814
3893
|
anchors = style.styleNodes(rng, {
|
3815
3894
|
nodeName: 'A',
|
@@ -3827,9 +3906,9 @@
|
|
3827
3906
|
}
|
3828
3907
|
});
|
3829
3908
|
|
3830
|
-
var startRange = range.
|
3909
|
+
var startRange = range.createFromNodeBefore(list.head(anchors));
|
3831
3910
|
var startPoint = startRange.getStartPoint();
|
3832
|
-
var endRange = range.
|
3911
|
+
var endRange = range.createFromNodeAfter(list.last(anchors));
|
3833
3912
|
var endPoint = endRange.getEndPoint();
|
3834
3913
|
|
3835
3914
|
range.create(
|
@@ -3852,7 +3931,7 @@
|
|
3852
3931
|
* @return {String} [return.url=""]
|
3853
3932
|
*/
|
3854
3933
|
this.getLinkInfo = function ($editable) {
|
3855
|
-
|
3934
|
+
this.focus($editable);
|
3856
3935
|
|
3857
3936
|
var rng = range.create().expand(dom.isAnchor);
|
3858
3937
|
|
@@ -3897,8 +3976,7 @@
|
|
3897
3976
|
var dimension = sDim.split('x');
|
3898
3977
|
beforeCommand($editable);
|
3899
3978
|
|
3900
|
-
var rng = range.create();
|
3901
|
-
rng = rng.deleteContents();
|
3979
|
+
var rng = range.create().deleteContents();
|
3902
3980
|
rng.insertNode(table.createTable(dimension[0], dimension[1]));
|
3903
3981
|
afterCommand($editable);
|
3904
3982
|
};
|
@@ -3989,7 +4067,7 @@
|
|
3989
4067
|
|
3990
4068
|
handler.bindCustomEvent(
|
3991
4069
|
$(), $editable.data('callbacks'), 'media.delete'
|
3992
|
-
)
|
4070
|
+
)($target, $editable);
|
3993
4071
|
|
3994
4072
|
afterCommand($editable);
|
3995
4073
|
};
|
@@ -4003,8 +4081,11 @@
|
|
4003
4081
|
$editable.focus();
|
4004
4082
|
|
4005
4083
|
// [workaround] for firefox bug http://goo.gl/lVfAaI
|
4006
|
-
if (agent.isFF) {
|
4007
|
-
range.createFromNode($editable[0]
|
4084
|
+
if (agent.isFF && !range.create().isOnEditable()) {
|
4085
|
+
range.createFromNode($editable[0])
|
4086
|
+
.normalize()
|
4087
|
+
.collapse()
|
4088
|
+
.select();
|
4008
4089
|
}
|
4009
4090
|
};
|
4010
4091
|
};
|
@@ -4910,6 +4991,7 @@
|
|
4910
4991
|
$linkText.val(linkInfo.text);
|
4911
4992
|
|
4912
4993
|
$linkText.on('input', function () {
|
4994
|
+
toggleBtn($linkBtn, $linkText.val() && $linkUrl.val());
|
4913
4995
|
// if linktext was modified by keyup,
|
4914
4996
|
// stop cloning text from linkUrl
|
4915
4997
|
linkInfo.text = $linkText.val();
|
@@ -4922,7 +5004,7 @@
|
|
4922
5004
|
}
|
4923
5005
|
|
4924
5006
|
$linkUrl.on('input', function () {
|
4925
|
-
toggleBtn($linkBtn, $linkUrl.val());
|
5007
|
+
toggleBtn($linkBtn, $linkText.val() && $linkUrl.val());
|
4926
5008
|
// display same link on `Text to display` input
|
4927
5009
|
// when create a new link
|
4928
5010
|
if (!linkInfo.text) {
|
@@ -5273,6 +5355,12 @@
|
|
5273
5355
|
}
|
5274
5356
|
};
|
5275
5357
|
|
5358
|
+
var hKeyupAndMouseup = function (event) {
|
5359
|
+
var layoutInfo = dom.makeLayoutInfo(event.currentTarget || event.target);
|
5360
|
+
modules.editor.removeBogus(layoutInfo.editable());
|
5361
|
+
hToolbarAndPopoverUpdate(event);
|
5362
|
+
};
|
5363
|
+
|
5276
5364
|
var hToolbarAndPopoverUpdate = function (event) {
|
5277
5365
|
// delay for range after mouseup
|
5278
5366
|
setTimeout(function () {
|
@@ -5290,7 +5378,7 @@
|
|
5290
5378
|
}, 0);
|
5291
5379
|
};
|
5292
5380
|
|
5293
|
-
var
|
5381
|
+
var hScrollAndBlur = function (event) {
|
5294
5382
|
var layoutInfo = dom.makeLayoutInfo(event.currentTarget || event.target);
|
5295
5383
|
//hide popover and handle when scrolled
|
5296
5384
|
modules.popover.hide(layoutInfo.popover());
|
@@ -5417,13 +5505,23 @@
|
|
5417
5505
|
keys.push(keyName);
|
5418
5506
|
}
|
5419
5507
|
|
5420
|
-
var
|
5508
|
+
var pluginEvent;
|
5509
|
+
var keyString = keys.join('+');
|
5510
|
+
var eventName = keyMap[keyString];
|
5421
5511
|
if (eventName) {
|
5422
|
-
|
5423
|
-
|
5424
|
-
|
5425
|
-
|
5512
|
+
// FIXME Summernote doesn't support event pipeline yet.
|
5513
|
+
// - Plugin -> Base Code
|
5514
|
+
pluginEvent = $.summernote.pluginEvents[keyString];
|
5515
|
+
if ($.isFunction(pluginEvent)) {
|
5516
|
+
if (pluginEvent(event, modules.editor, layoutInfo)) {
|
5517
|
+
return false;
|
5426
5518
|
}
|
5519
|
+
}
|
5520
|
+
|
5521
|
+
pluginEvent = $.summernote.pluginEvents[eventName];
|
5522
|
+
|
5523
|
+
if ($.isFunction(pluginEvent)) {
|
5524
|
+
pluginEvent(event, modules.editor, layoutInfo);
|
5427
5525
|
} else if (modules.editor[eventName]) {
|
5428
5526
|
modules.editor[eventName]($editable, $editor.data('options'));
|
5429
5527
|
event.preventDefault();
|
@@ -5449,8 +5547,10 @@
|
|
5449
5547
|
this.bindKeyMap(layoutInfo, options.keyMap[agent.isMac ? 'mac' : 'pc']);
|
5450
5548
|
}
|
5451
5549
|
layoutInfo.editable().on('mousedown', hMousedown);
|
5452
|
-
layoutInfo.editable().on('keyup mouseup',
|
5453
|
-
layoutInfo.editable().on('scroll',
|
5550
|
+
layoutInfo.editable().on('keyup mouseup', hKeyupAndMouseup);
|
5551
|
+
layoutInfo.editable().on('scroll blur', hScrollAndBlur);
|
5552
|
+
|
5553
|
+
// handler for clipboard
|
5454
5554
|
modules.clipboard.attach(layoutInfo, options);
|
5455
5555
|
|
5456
5556
|
// handler for handle and popover
|
@@ -5519,13 +5619,7 @@
|
|
5519
5619
|
// Textarea: auto filling the code before form submit.
|
5520
5620
|
if (dom.isTextarea(list.head(layoutInfo.holder()))) {
|
5521
5621
|
layoutInfo.holder().closest('form').submit(function () {
|
5522
|
-
|
5523
|
-
layoutInfo.holder().val(contents);
|
5524
|
-
|
5525
|
-
// callback on submit
|
5526
|
-
if (options.onsubmit) {
|
5527
|
-
options.onsubmit(contents);
|
5528
|
-
}
|
5622
|
+
layoutInfo.holder().val(layoutInfo.holder().code());
|
5529
5623
|
});
|
5530
5624
|
}
|
5531
5625
|
};
|
@@ -5564,7 +5658,6 @@
|
|
5564
5658
|
bindCustomEvent($holder, callbacks, 'change')($editable.html(), $editable);
|
5565
5659
|
});
|
5566
5660
|
|
5567
|
-
// callbacks for advanced features (camel)
|
5568
5661
|
if (!options.airMode) {
|
5569
5662
|
layoutInfo.toolbar().click(bindCustomEvent($holder, callbacks, 'toolbar.click'));
|
5570
5663
|
layoutInfo.popover().click(bindCustomEvent($holder, callbacks, 'popover.click'));
|
@@ -5774,7 +5867,7 @@
|
|
5774
5867
|
'</span>';
|
5775
5868
|
return tplButton(label, {
|
5776
5869
|
title: lang.font.name,
|
5777
|
-
dropdown: '<ul class="dropdown-menu">' + items + '</ul>'
|
5870
|
+
dropdown: '<ul class="dropdown-menu note-check">' + items + '</ul>'
|
5778
5871
|
});
|
5779
5872
|
},
|
5780
5873
|
fontsize: function (lang, options) {
|
@@ -5787,7 +5880,7 @@
|
|
5787
5880
|
var label = '<span class="note-current-fontsize">11</span>';
|
5788
5881
|
return tplButton(label, {
|
5789
5882
|
title: lang.font.size,
|
5790
|
-
dropdown: '<ul class="dropdown-menu">' + items + '</ul>'
|
5883
|
+
dropdown: '<ul class="dropdown-menu note-check">' + items + '</ul>'
|
5791
5884
|
});
|
5792
5885
|
},
|
5793
5886
|
color: function (lang, options) {
|
@@ -5930,7 +6023,7 @@
|
|
5930
6023
|
|
5931
6024
|
return tplIconButton(options.iconPrefix + 'text-height', {
|
5932
6025
|
title: lang.font.height,
|
5933
|
-
dropdown: '<ul class="dropdown-menu">' + items + '</ul>'
|
6026
|
+
dropdown: '<ul class="dropdown-menu note-check">' + items + '</ul>'
|
5934
6027
|
});
|
5935
6028
|
|
5936
6029
|
},
|
@@ -6257,7 +6350,7 @@
|
|
6257
6350
|
'<div class="title">' + lang.shortcut.shortcuts + '</div>' +
|
6258
6351
|
(agent.isMac ? tplShortcutTable(lang, options) : replaceMacKeys(tplShortcutTable(lang, options))) +
|
6259
6352
|
'<p class="text-center">' +
|
6260
|
-
'<a href="//summernote.org/" target="_blank">Summernote 0.6.
|
6353
|
+
'<a href="//summernote.org/" target="_blank">Summernote 0.6.7</a> · ' +
|
6261
6354
|
'<a href="//github.com/summernote/summernote" target="_blank">Project</a> · ' +
|
6262
6355
|
'<a href="//github.com/summernote/summernote/issues" target="_blank">Issues</a>' +
|
6263
6356
|
'</p>';
|
@@ -6616,6 +6709,7 @@
|
|
6616
6709
|
*/
|
6617
6710
|
core: {
|
6618
6711
|
agent: agent,
|
6712
|
+
list : list,
|
6619
6713
|
dom: dom,
|
6620
6714
|
range: range
|
6621
6715
|
},
|
@@ -6759,16 +6853,28 @@
|
|
6759
6853
|
// - {Object}: init options
|
6760
6854
|
var type = $.type(list.head(arguments));
|
6761
6855
|
var isExternalAPICalled = type === 'string';
|
6762
|
-
var
|
6856
|
+
var hasInitOptions = type === 'object';
|
6763
6857
|
|
6764
6858
|
// extend default options with custom user options
|
6765
|
-
var options =
|
6859
|
+
var options = hasInitOptions ? list.head(arguments) : {};
|
6860
|
+
|
6766
6861
|
options = $.extend({}, $.summernote.options, options);
|
6767
6862
|
|
6768
6863
|
// Include langInfo in options for later use, e.g. for image drag-n-drop
|
6769
6864
|
// Setup language info with en-US as default
|
6770
6865
|
options.langInfo = $.extend(true, {}, $.summernote.lang['en-US'], $.summernote.lang[options.lang]);
|
6771
6866
|
|
6867
|
+
// override plugin options
|
6868
|
+
if (!isExternalAPICalled && hasInitOptions) {
|
6869
|
+
for (var i = 0, len = $.summernote.plugins.length; i < len; i++) {
|
6870
|
+
var plugin = $.summernote.plugins[i];
|
6871
|
+
|
6872
|
+
if (options.plugin[plugin.name]) {
|
6873
|
+
$.summernote.plugins[i] = $.extend(true, plugin, options.plugin[plugin.name]);
|
6874
|
+
}
|
6875
|
+
}
|
6876
|
+
}
|
6877
|
+
|
6772
6878
|
this.each(function (idx, holder) {
|
6773
6879
|
var $holder = $(holder);
|
6774
6880
|
|
@@ -6777,6 +6883,7 @@
|
|
6777
6883
|
renderer.createLayout($holder, options);
|
6778
6884
|
|
6779
6885
|
var layoutInfo = renderer.layoutInfoFromHolder($holder);
|
6886
|
+
$holder.data('layoutInfo', layoutInfo);
|
6780
6887
|
|
6781
6888
|
eventHandler.attach(layoutInfo, options);
|
6782
6889
|
eventHandler.attachCustomEvent(layoutInfo, options);
|
@@ -6784,11 +6891,6 @@
|
|
6784
6891
|
}
|
6785
6892
|
});
|
6786
6893
|
|
6787
|
-
// callback on init
|
6788
|
-
if (!isExternalAPICalled && this.length && options.oninit) {
|
6789
|
-
options.oninit();
|
6790
|
-
}
|
6791
|
-
|
6792
6894
|
var $first = this.first();
|
6793
6895
|
if ($first.length) {
|
6794
6896
|
var layoutInfo = renderer.layoutInfoFromHolder($first);
|
@@ -1 +1 @@
|
|
1
|
-
.note-editor{position:relative;border:1px solid #a9a9a9}.note-editor .note-dropzone{position:absolute;z-index:100;display:none;color:#87cefa;background-color:white;border:2px dashed #87cefa;opacity:.95;pointer-event:none}.note-editor .note-dropzone .note-dropzone-message{display:table-cell;font-size:28px;font-weight:bold;text-align:center;vertical-align:middle}.note-editor .note-dropzone.hover{color:#098ddf;border:2px dashed #098ddf}.note-editor.dragover .note-dropzone{display:table}.note-editor .note-toolbar{background-color:#f5f5f5;border-bottom:1px solid #a9a9a9}.note-editor.fullscreen{position:fixed;top:0;left:0;z-index:1050;width:100%}.note-editor.fullscreen .note-editable{background-color:white}.note-editor.fullscreen .note-resizebar{display:none}.note-editor.codeview .note-editable{display:none}.note-editor.codeview .note-codable{display:block}.note-editor .note-statusbar{background-color:#f5f5f5}.note-editor .note-statusbar .note-resizebar{width:100%;height:8px;cursor:ns-resize;border-top:1px solid #a9a9a9}.note-editor .note-statusbar .note-resizebar .note-icon-bar{width:20px;margin:1px auto;border-top:1px solid #a9a9a9}.note-editor .note-editable[contenteditable=true]:empty:not(:focus):before{color:#a9a9a9;content:attr(data-placeholder)}.note-editor .note-editable{padding:10px;overflow:auto;outline:0}.note-editor .note-editable[contenteditable="false"]{background-color:#e5e5e5}.note-editor .note-codable{display:none;width:100%;padding:10px;margin-bottom:0;font-family:Menlo,Monaco,monospace,sans-serif;font-size:14px;color:#ccc;background-color:#222;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;resize:none}.note-air-editor{outline:0}.note-popover .popover{max-width:none}.note-popover .popover .popover-content a{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}.note-popover .popover .arrow{left:20px}.note-popover .popover .popover-content,.note-toolbar{padding:0 0 5px 5px;margin:0}.note-popover .popover .popover-content>.btn-group,.note-toolbar>.btn-group{margin-top:5px;margin-right:5px;margin-left:0}.note-popover .popover .popover-content .btn-group .note-table,.note-toolbar .btn-group .note-table{min-width:0;padding:5px}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker,.note-toolbar .btn-group .note-table .note-dimension-picker{font-size:18px}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher,.note-toolbar .btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher{position:absolute!important;z-index:3;width:10em;height:10em;cursor:pointer}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted,.note-toolbar .btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted{position:relative!important;z-index:1;width:5em;height:5em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted,.note-toolbar .btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted{position:absolute!important;z-index:2;width:1em;height:1em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-popover .popover .popover-content .note-style h1,.note-toolbar .note-style h1,.note-popover .popover .popover-content .note-style h2,.note-toolbar .note-style h2,.note-popover .popover .popover-content .note-style h3,.note-toolbar .note-style h3,.note-popover .popover .popover-content .note-style h4,.note-toolbar .note-style h4,.note-popover .popover .popover-content .note-style h5,.note-toolbar .note-style h5,.note-popover .popover .popover-content .note-style h6,.note-toolbar .note-style h6,.note-popover .popover .popover-content .note-style blockquote,.note-toolbar .note-style blockquote{margin:0}.note-popover .popover .popover-content .note-color .dropdown-toggle,.note-toolbar .note-color .dropdown-toggle{width:20px;padding-left:5px}.note-popover .popover .popover-content .note-color .dropdown-menu,.note-toolbar .note-color .dropdown-menu{min-width:340px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group,.note-toolbar .note-color .dropdown-menu .btn-group{margin:0}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group:first-child,.note-toolbar .note-color .dropdown-menu .btn-group:first-child{margin:0 5px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-palette-title,.note-toolbar .note-color .dropdown-menu .btn-group .note-palette-title{margin:2px 7px;font-size:12px;text-align:center;border-bottom:1px solid #eee}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-color-reset,.note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset{padding:0 3px;margin:3px;font-size:11px;cursor:pointer;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-color-row,.note-toolbar .note-color .dropdown-menu .btn-group .note-color-row{height:20px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-color-reset:hover,.note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset:hover{background:#eee}.note-popover .popover .popover-content .note-para .dropdown-menu,.note-toolbar .note-para .dropdown-menu{min-width:216px;padding:5px}.note-popover .popover .popover-content .note-para .dropdown-menu>div:first-child,.note-toolbar .note-para .dropdown-menu>div:first-child{margin-right:5px}.note-popover .popover .popover-content .dropdown-menu,.note-toolbar .dropdown-menu{min-width:90px}.note-popover .popover .popover-content .dropdown-menu.right,.note-toolbar .dropdown-menu.right{right:0;left:auto}.note-popover .popover .popover-content .dropdown-menu.right::before,.note-toolbar .dropdown-menu.right::before{right:9px;left:auto!important}.note-popover .popover .popover-content .dropdown-menu.right::after,.note-toolbar .dropdown-menu.right::after{right:10px;left:auto!important}.note-popover .popover .popover-content .dropdown-menu li a i,.note-toolbar .dropdown-menu li a i{color:deepskyblue;visibility:hidden}.note-popover .popover .popover-content .dropdown-menu li a.checked i,.note-toolbar .dropdown-menu li a.checked i{visibility:visible}.note-popover .popover .popover-content .note-fontsize-10,.note-toolbar .note-fontsize-10{font-size:10px}.note-popover .popover .popover-content .note-color-palette,.note-toolbar .note-color-palette{line-height:1}.note-popover .popover .popover-content .note-color-palette div .note-color-btn,.note-toolbar .note-color-palette div .note-color-btn{width:20px;height:20px;padding:0;margin:0;border:1px solid #fff}.note-popover .popover .popover-content .note-color-palette div .note-color-btn:hover,.note-toolbar .note-color-palette div .note-color-btn:hover{border:1px solid #000}.note-dialog>div{display:none}.note-dialog .form-group{margin-right:0;margin-left:0}.note-dialog .note-modal-form{margin:0}.note-dialog .note-image-dialog .note-dropzone{min-height:100px;margin-bottom:10px;font-size:30px;line-height:4;color:lightgray;text-align:center;border:4px dashed lightgray}.note-dialog .note-help-dialog{font-size:12px;color:#ccc;background:transparent;background-color:#222!important;border:0;-webkit-opacity:.9;-khtml-opacity:.9;-moz-opacity:.9;opacity:.9;-ms-filter:alpha(opacity=90);filter:alpha(opacity=90)}.note-dialog .note-help-dialog .modal-content{background:transparent;border:1px solid white;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.note-dialog .note-help-dialog a{font-size:12px;color:white}.note-dialog .note-help-dialog .title{padding-bottom:5px;margin-bottom:10px;font-size:14px;font-weight:bold;color:white;border-bottom:white 1px solid}.note-dialog .note-help-dialog .modal-close{font-size:14px;color:#dd0;cursor:pointer}.note-dialog .note-help-dialog .text-center{margin:10px 0 0}.note-dialog .note-help-dialog .note-shortcut{padding-top:8px;padding-bottom:8px}.note-dialog .note-help-dialog .note-shortcut-row{margin-right:-5px;margin-left:-5px}.note-dialog .note-help-dialog .note-shortcut-col{padding-right:5px;padding-left:5px}.note-dialog .note-help-dialog .note-shortcut-title{font-size:13px;font-weight:bold;color:#dd0}.note-dialog .note-help-dialog .note-shortcut-key{font-family:"Courier New";color:#dd0;text-align:right}.note-handle .note-control-selection{position:absolute;display:none;border:1px solid black}.note-handle .note-control-selection>div{position:absolute}.note-handle .note-control-selection .note-control-selection-bg{width:100%;height:100%;background-color:black;-webkit-opacity:.3;-khtml-opacity:.3;-moz-opacity:.3;opacity:.3;-ms-filter:alpha(opacity=30);filter:alpha(opacity=30)}.note-handle .note-control-selection .note-control-handle{width:7px;height:7px;border:1px solid black}.note-handle .note-control-selection .note-control-holder{width:7px;height:7px;border:1px solid black}.note-handle .note-control-selection .note-control-sizing{width:7px;height:7px;background-color:white;border:1px solid black}.note-handle .note-control-selection .note-control-nw{top:-5px;left:-5px;border-right:0;border-bottom:0}.note-handle .note-control-selection .note-control-ne{top:-5px;right:-5px;border-bottom:0;border-left:none}.note-handle .note-control-selection .note-control-sw{bottom:-5px;left:-5px;border-top:0;border-right:0}.note-handle .note-control-selection .note-control-se{right:-5px;bottom:-5px;cursor:se-resize}.note-handle .note-control-selection .note-control-selection-info{right:0;bottom:0;padding:5px;margin:5px;font-size:12px;color:white;background-color:black;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-opacity:.7;-khtml-opacity:.7;-moz-opacity:.7;opacity:.7;-ms-filter:alpha(opacity=70);filter:alpha(opacity=70)}
|
1
|
+
.note-editor{position:relative;border:1px solid #a9a9a9}.note-editor .note-dropzone{position:absolute;z-index:100;display:none;color:#87cefa;background-color:white;border:2px dashed #87cefa;opacity:.95;pointer-event:none}.note-editor .note-dropzone .note-dropzone-message{display:table-cell;font-size:28px;font-weight:bold;text-align:center;vertical-align:middle}.note-editor .note-dropzone.hover{color:#098ddf;border:2px dashed #098ddf}.note-editor.dragover .note-dropzone{display:table}.note-editor .note-toolbar{background-color:#f5f5f5;border-bottom:1px solid #a9a9a9}.note-editor.fullscreen{position:fixed;top:0;left:0;z-index:1050;width:100%}.note-editor.fullscreen .note-editable{background-color:white}.note-editor.fullscreen .note-resizebar{display:none}.note-editor.codeview .note-editable{display:none}.note-editor.codeview .note-codable{display:block}.note-editor .note-statusbar{background-color:#f5f5f5}.note-editor .note-statusbar .note-resizebar{width:100%;height:8px;cursor:ns-resize;border-top:1px solid #a9a9a9}.note-editor .note-statusbar .note-resizebar .note-icon-bar{width:20px;margin:1px auto;border-top:1px solid #a9a9a9}.note-editor .note-editable[contenteditable=true]:empty:not(:focus):before{color:#a9a9a9;content:attr(data-placeholder)}.note-editor .note-editable{padding:10px;overflow:auto;outline:0}.note-editor .note-editable[contenteditable="false"]{background-color:#e5e5e5}.note-editor .note-codable{display:none;width:100%;padding:10px;margin-bottom:0;font-family:Menlo,Monaco,monospace,sans-serif;font-size:14px;color:#ccc;background-color:#222;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;resize:none}.note-air-editor{outline:0}.note-popover .popover{max-width:none}.note-popover .popover .popover-content a{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}.note-popover .popover .arrow{left:20px}.note-popover .popover .popover-content,.note-toolbar{padding:0 0 5px 5px;margin:0}.note-popover .popover .popover-content>.btn-group,.note-toolbar>.btn-group{margin-top:5px;margin-right:5px;margin-left:0}.note-popover .popover .popover-content .btn-group .note-table,.note-toolbar .btn-group .note-table{min-width:0;padding:5px}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker,.note-toolbar .btn-group .note-table .note-dimension-picker{font-size:18px}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher,.note-toolbar .btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher{position:absolute!important;z-index:3;width:10em;height:10em;cursor:pointer}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted,.note-toolbar .btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted{position:relative!important;z-index:1;width:5em;height:5em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-popover .popover .popover-content .btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted,.note-toolbar .btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted{position:absolute!important;z-index:2;width:1em;height:1em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-popover .popover .popover-content .note-style h1,.note-toolbar .note-style h1,.note-popover .popover .popover-content .note-style h2,.note-toolbar .note-style h2,.note-popover .popover .popover-content .note-style h3,.note-toolbar .note-style h3,.note-popover .popover .popover-content .note-style h4,.note-toolbar .note-style h4,.note-popover .popover .popover-content .note-style h5,.note-toolbar .note-style h5,.note-popover .popover .popover-content .note-style h6,.note-toolbar .note-style h6,.note-popover .popover .popover-content .note-style blockquote,.note-toolbar .note-style blockquote{margin:0}.note-popover .popover .popover-content .note-color .dropdown-toggle,.note-toolbar .note-color .dropdown-toggle{width:20px;padding-left:5px}.note-popover .popover .popover-content .note-color .dropdown-menu,.note-toolbar .note-color .dropdown-menu{min-width:340px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group,.note-toolbar .note-color .dropdown-menu .btn-group{margin:0}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group:first-child,.note-toolbar .note-color .dropdown-menu .btn-group:first-child{margin:0 5px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-palette-title,.note-toolbar .note-color .dropdown-menu .btn-group .note-palette-title{margin:2px 7px;font-size:12px;text-align:center;border-bottom:1px solid #eee}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-color-reset,.note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset{padding:0 3px;margin:3px;font-size:11px;cursor:pointer;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-color-row,.note-toolbar .note-color .dropdown-menu .btn-group .note-color-row{height:20px}.note-popover .popover .popover-content .note-color .dropdown-menu .btn-group .note-color-reset:hover,.note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset:hover{background:#eee}.note-popover .popover .popover-content .note-para .dropdown-menu,.note-toolbar .note-para .dropdown-menu{min-width:216px;padding:5px}.note-popover .popover .popover-content .note-para .dropdown-menu>div:first-child,.note-toolbar .note-para .dropdown-menu>div:first-child{margin-right:5px}.note-popover .popover .popover-content .dropdown-menu,.note-toolbar .dropdown-menu{min-width:90px}.note-popover .popover .popover-content .dropdown-menu.right,.note-toolbar .dropdown-menu.right{right:0;left:auto}.note-popover .popover .popover-content .dropdown-menu.right::before,.note-toolbar .dropdown-menu.right::before{right:9px;left:auto!important}.note-popover .popover .popover-content .dropdown-menu.right::after,.note-toolbar .dropdown-menu.right::after{right:10px;left:auto!important}.note-popover .popover .popover-content .dropdown-menu.note-check li a i,.note-toolbar .dropdown-menu.note-check li a i{color:deepskyblue;visibility:hidden}.note-popover .popover .popover-content .dropdown-menu.note-check li a.checked i,.note-toolbar .dropdown-menu.note-check li a.checked i{visibility:visible}.note-popover .popover .popover-content .note-fontsize-10,.note-toolbar .note-fontsize-10{font-size:10px}.note-popover .popover .popover-content .note-color-palette,.note-toolbar .note-color-palette{line-height:1}.note-popover .popover .popover-content .note-color-palette div .note-color-btn,.note-toolbar .note-color-palette div .note-color-btn{width:20px;height:20px;padding:0;margin:0;border:1px solid #fff}.note-popover .popover .popover-content .note-color-palette div .note-color-btn:hover,.note-toolbar .note-color-palette div .note-color-btn:hover{border:1px solid #000}.note-dialog>div{display:none}.note-dialog .form-group{margin-right:0;margin-left:0}.note-dialog .note-modal-form{margin:0}.note-dialog .note-image-dialog .note-dropzone{min-height:100px;margin-bottom:10px;font-size:30px;line-height:4;color:lightgray;text-align:center;border:4px dashed lightgray}.note-dialog .note-help-dialog{font-size:12px;color:#ccc;background:transparent;background-color:#222!important;border:0;-webkit-opacity:.9;-khtml-opacity:.9;-moz-opacity:.9;opacity:.9;-ms-filter:alpha(opacity=90);filter:alpha(opacity=90)}.note-dialog .note-help-dialog .modal-content{background:transparent;border:1px solid white;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.note-dialog .note-help-dialog a{font-size:12px;color:white}.note-dialog .note-help-dialog .title{padding-bottom:5px;margin-bottom:10px;font-size:14px;font-weight:bold;color:white;border-bottom:white 1px solid}.note-dialog .note-help-dialog .modal-close{font-size:14px;color:#dd0;cursor:pointer}.note-dialog .note-help-dialog .text-center{margin:10px 0 0}.note-dialog .note-help-dialog .note-shortcut{padding-top:8px;padding-bottom:8px}.note-dialog .note-help-dialog .note-shortcut-row{margin-right:-5px;margin-left:-5px}.note-dialog .note-help-dialog .note-shortcut-col{padding-right:5px;padding-left:5px}.note-dialog .note-help-dialog .note-shortcut-title{font-size:13px;font-weight:bold;color:#dd0}.note-dialog .note-help-dialog .note-shortcut-key{font-family:"Courier New";color:#dd0;text-align:right}.note-handle .note-control-selection{position:absolute;display:none;border:1px solid black}.note-handle .note-control-selection>div{position:absolute}.note-handle .note-control-selection .note-control-selection-bg{width:100%;height:100%;background-color:black;-webkit-opacity:.3;-khtml-opacity:.3;-moz-opacity:.3;opacity:.3;-ms-filter:alpha(opacity=30);filter:alpha(opacity=30)}.note-handle .note-control-selection .note-control-handle{width:7px;height:7px;border:1px solid black}.note-handle .note-control-selection .note-control-holder{width:7px;height:7px;border:1px solid black}.note-handle .note-control-selection .note-control-sizing{width:7px;height:7px;background-color:white;border:1px solid black}.note-handle .note-control-selection .note-control-nw{top:-5px;left:-5px;border-right:0;border-bottom:0}.note-handle .note-control-selection .note-control-ne{top:-5px;right:-5px;border-bottom:0;border-left:none}.note-handle .note-control-selection .note-control-sw{bottom:-5px;left:-5px;border-top:0;border-right:0}.note-handle .note-control-selection .note-control-se{right:-5px;bottom:-5px;cursor:se-resize}.note-handle .note-control-selection .note-control-selection-info{right:0;bottom:0;padding:5px;margin:5px;font-size:12px;color:white;background-color:black;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-opacity:.7;-khtml-opacity:.7;-moz-opacity:.7;opacity:.7;-ms-filter:alpha(opacity=70);filter:alpha(opacity=70)}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: summernote-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hyo Seong Choi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- vendor/assets/javascripts/summernote/locales/nl-NL.js
|
89
89
|
- vendor/assets/javascripts/summernote/locales/pl-PL.js
|
90
90
|
- vendor/assets/javascripts/summernote/locales/pt-BR.js
|
91
|
+
- vendor/assets/javascripts/summernote/locales/pt-PT.js
|
91
92
|
- vendor/assets/javascripts/summernote/locales/ro-RO.js
|
92
93
|
- vendor/assets/javascripts/summernote/locales/ru-RU.js
|
93
94
|
- vendor/assets/javascripts/summernote/locales/sk-SK.js
|
@@ -102,10 +103,10 @@ files:
|
|
102
103
|
- vendor/assets/javascripts/summernote/locales/zh-CN.js
|
103
104
|
- vendor/assets/javascripts/summernote/locales/zh-TW.js
|
104
105
|
- vendor/assets/javascripts/summernote/plugin/summernote-ext-hello.js
|
106
|
+
- vendor/assets/javascripts/summernote/plugin/summernote-ext-hint.js
|
105
107
|
- vendor/assets/javascripts/summernote/plugin/summernote-ext-video.js
|
106
108
|
- vendor/assets/javascripts/summernote/summernote.js
|
107
|
-
- vendor/assets/stylesheets/summernote
|
108
|
-
- vendor/assets/stylesheets/summernote/summernote.css
|
109
|
+
- vendor/assets/stylesheets/summernote.css
|
109
110
|
homepage: https://github.com/summernote/summernote-rails
|
110
111
|
licenses:
|
111
112
|
- MIT
|