activeadmin_trumbowyg 1.1.0 → 1.2.0
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 +4 -4
- data/README.md +6 -5
- data/Rakefile +11 -0
- data/app/assets/fonts/trumbowyg/icons.svg +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/az.js +63 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/az.min.js +9 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ca.js +30 -13
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/ca.min.js +8 -5
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/cs.js +11 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/cs.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/da.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/de.js +11 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/de.min.js +3 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/es_ar.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/et.js +7 -7
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/fa.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/fi.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/fr.js +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/fr.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/he.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/hu.js +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/hu.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/id.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/it.js +4 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/it.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/lt.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/mn.js +39 -39
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/{no_nb.js → nb.js} +22 -8
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/nb.min.js +15 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/pl.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt.js +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/pt_br.js +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/rs.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/rs_latin.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.js +10 -6
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.min.js +2 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sq.js +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sv.js +1 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sv.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/th.js +33 -33
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/tr.js +5 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/tr.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_cn.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/zh_tw.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.min.js +11 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.js +28 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.min.js +8 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.min.js +11 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.js +39 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.min.js +10 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/sass/trumbowyg.colors.scss +3 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.css +45 -40
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.js +916 -848
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.min.js +9 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/sass/trumbowyg.emoji.scss +3 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.css +23 -18
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.min.css +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.js +22 -7
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.js +100 -8
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontsize/trumbowyg.fontsize.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.js +251 -172
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/trumbowyg.giphy.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/sass/trumbowyg.giphy.scss +17 -16
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.css +60 -47
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.js +24 -4
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/sass/trumbowyg.highlight.scss +12 -12
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.css +13 -10
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.js +6 -61
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.min.js +8 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.js +31 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.min.js +9 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.js +18 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js +8 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.js +50 -5
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.js +97 -50
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js +8 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/sass/trumbowyg.mathml.scss +31 -26
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.css +29 -21
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.js +12 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.min.js +10 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/sass/trumbowyg.mention.scss +3 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.css +16 -17
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.js +51 -20
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.min.js +8 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.js +36 -53
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.min.js +10 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js +9 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.js +12 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.min.js +8 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.min.js +3 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.js +20 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.min.js +10 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.js +18 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.min.js +8 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss +3 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.css +25 -19
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.min.css +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/speechrecognition/trumbowyg.speechrecognition.js +198 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/speechrecognition/trumbowyg.speechrecognition.min.js +11 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.js +1436 -158
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.min.js +11 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/sass/trumbowyg.table.scss +157 -32
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.css +143 -22
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.js +9 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/tenor/trumbowyg.tenor.js +319 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/tenor/trumbowyg.tenor.min.js +1 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/tenor/ui/sass/trumbowyg.tenor.scss +124 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/tenor/ui/trumbowyg.tenor.css +119 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/tenor/ui/trumbowyg.tenor.min.css +2 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.js +119 -76
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.min.js +13 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.js +126 -80
- data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.min.js +2 -12
- data/app/assets/stylesheets/activeadmin/_trumbowyg_input.scss +3 -1
- data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.css +776 -0
- data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.min.css +3 -0
- data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.min.css.map +1 -0
- data/lib/activeadmin/trumbowyg/version.rb +1 -1
- data/lib/tasks/trumbowyg.rake +2 -2
- metadata +18 -21
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/no_nb.min.js +0 -10
- data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.scss +0 -836
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.js
CHANGED
@@ -13,6 +13,24 @@
|
|
13
13
|
'2.0': 'Extra large'
|
14
14
|
}
|
15
15
|
},
|
16
|
+
az: {
|
17
|
+
lineheight: 'Sətir yüksəkliyi',
|
18
|
+
lineheights: {
|
19
|
+
'0.9': 'Kiçik',
|
20
|
+
'normal': 'Normal',
|
21
|
+
'1.5': 'Böyük',
|
22
|
+
'2.0': 'Daha böyük'
|
23
|
+
}
|
24
|
+
},
|
25
|
+
by: {
|
26
|
+
lineheight: 'Міжрадковы інтэрвал',
|
27
|
+
lineheights: {
|
28
|
+
'0.9': 'Маленькі',
|
29
|
+
'normal': 'Звычайны',
|
30
|
+
'1.5': 'Вялікі',
|
31
|
+
'2.0': 'Вельмі вялікі'
|
32
|
+
}
|
33
|
+
},
|
16
34
|
da: {
|
17
35
|
lineheight: 'Linjehøjde',
|
18
36
|
lineheights: {
|
@@ -22,6 +40,15 @@
|
|
22
40
|
'2.0': 'Ekstra stor'
|
23
41
|
}
|
24
42
|
},
|
43
|
+
de: {
|
44
|
+
lineheight: 'Zeilenhöhe',
|
45
|
+
lineheights: {
|
46
|
+
'0.9': 'Klein',
|
47
|
+
'normal': 'Normal',
|
48
|
+
'1.5': 'Groß',
|
49
|
+
'2.0': 'Sehr groß'
|
50
|
+
}
|
51
|
+
},
|
25
52
|
et: {
|
26
53
|
lineheight: 'Reavahe',
|
27
54
|
lineheights: {
|
@@ -85,6 +112,24 @@
|
|
85
112
|
'2.0': 'Extra grande'
|
86
113
|
}
|
87
114
|
},
|
115
|
+
ru: {
|
116
|
+
lineheight: 'Межстрочный интервал',
|
117
|
+
lineheights: {
|
118
|
+
'0.9': 'Маленький',
|
119
|
+
'normal': 'Обычный',
|
120
|
+
'1.5': 'Большой',
|
121
|
+
'2.0': 'Очень большой'
|
122
|
+
}
|
123
|
+
},
|
124
|
+
sl: {
|
125
|
+
lineheight: 'Višina vrstice',
|
126
|
+
lineheights: {
|
127
|
+
'0.9': 'Majhna',
|
128
|
+
'normal': 'Navadna',
|
129
|
+
'1.5': 'Velika',
|
130
|
+
'2.0': 'Ekstra velika'
|
131
|
+
}
|
132
|
+
},
|
88
133
|
tr: {
|
89
134
|
lineheight: 'Satır yüksekliği',
|
90
135
|
lineheights: {
|
@@ -102,7 +147,7 @@
|
|
102
147
|
'1.5': '大',
|
103
148
|
'2.0': '特大'
|
104
149
|
}
|
105
|
-
}
|
150
|
+
}
|
106
151
|
}
|
107
152
|
});
|
108
153
|
// jshint camelcase:true
|
@@ -122,8 +167,8 @@
|
|
122
167
|
lineheight: {
|
123
168
|
init: function (trumbowyg) {
|
124
169
|
trumbowyg.o.plugins.lineheight = $.extend({},
|
125
|
-
|
126
|
-
|
170
|
+
defaultOptions,
|
171
|
+
trumbowyg.o.plugins.lineheight || {}
|
127
172
|
);
|
128
173
|
|
129
174
|
trumbowyg.addBtnDef('lineheight', {
|
@@ -138,11 +183,11 @@
|
|
138
183
|
function buildDropdown(trumbowyg) {
|
139
184
|
var dropdown = [];
|
140
185
|
|
141
|
-
$.each(trumbowyg.o.plugins.lineheight.sizeList, function(index, size) {
|
186
|
+
$.each(trumbowyg.o.plugins.lineheight.sizeList, function (index, size) {
|
142
187
|
trumbowyg.addBtnDef('lineheight_' + size, {
|
143
188
|
text: trumbowyg.lang.lineheights[size] || size,
|
144
189
|
hasIcon: false,
|
145
|
-
fn: function(){
|
190
|
+
fn: function () {
|
146
191
|
trumbowyg.saveRange();
|
147
192
|
var text = trumbowyg.getRangeText();
|
148
193
|
if (text.replace(/\s/g, '') !== '') {
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{lineheight:"Line height",lineheights:{.9:"Small",normal:"Regular",1.5:"Large","2.0":"Extra large"}},da:{lineheight:"Linjehøjde",lineheights:{.9:"Lille",normal:"Normal",1.5:"Stor","2.0":"Ekstra stor"}},et:{lineheight:"Reavahe",lineheights:{.9:"Väike",normal:"Tavaline",1.5:"Suur","2.0":"Väga suur"}},fr:{lineheight:"Hauteur de ligne",lineheights:{.9:"Petite",normal:"Normale",1.5:"Grande","2.0":"Très grande"}},hu:{lineheight:"Line height",lineheights:{.9:"Small",normal:"Regular",1.5:"Large","2.0":"Extra large"}},it:{lineheight:"Altezza linea",lineheights:{.9:"Bassa",normal:"Normale",1.5:"Alta","2.0":"Molto alta"}},ko:{lineheight:"줄 간격",lineheights:{.9:"좁게",normal:"보통",1.5:"넓게","2.0":"아주 넓게"}},nl:{lineheight:"Regelhoogte",lineheights:{.9:"Klein",normal:"Normaal",1.5:"Groot","2.0":"Extra groot"}},pt_br:{lineheight:"Altura de linha",lineheights:{.9:"Pequena",normal:"Regular",1.5:"Grande","2.0":"Extra grande"}},tr:{lineheight:"Satır yüksekliği",lineheights:{.9:"Küçük",normal:"Normal",1.5:"Büyük","2.0":"Çok Büyük"}},zh_tw:{lineheight:"文字間距",lineheights:{.9:"小",normal:"正常",1.5:"大","2.0":"特大"}}}});var
|
1
|
+
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{lineheight:"Line height",lineheights:{.9:"Small",normal:"Regular",1.5:"Large","2.0":"Extra large"}},az:{lineheight:"Sətir yüksəkliyi",lineheights:{.9:"Kiçik",normal:"Normal",1.5:"Böyük","2.0":"Daha böyük"}},by:{lineheight:"Міжрадковы інтэрвал",lineheights:{.9:"Маленькі",normal:"Звычайны",1.5:"Вялікі","2.0":"Вельмі вялікі"}},da:{lineheight:"Linjehøjde",lineheights:{.9:"Lille",normal:"Normal",1.5:"Stor","2.0":"Ekstra stor"}},de:{lineheight:"Zeilenhöhe",lineheights:{.9:"Klein",normal:"Normal",1.5:"Groß","2.0":"Sehr groß"}},et:{lineheight:"Reavahe",lineheights:{.9:"Väike",normal:"Tavaline",1.5:"Suur","2.0":"Väga suur"}},fr:{lineheight:"Hauteur de ligne",lineheights:{.9:"Petite",normal:"Normale",1.5:"Grande","2.0":"Très grande"}},hu:{lineheight:"Line height",lineheights:{.9:"Small",normal:"Regular",1.5:"Large","2.0":"Extra large"}},it:{lineheight:"Altezza linea",lineheights:{.9:"Bassa",normal:"Normale",1.5:"Alta","2.0":"Molto alta"}},ko:{lineheight:"줄 간격",lineheights:{.9:"좁게",normal:"보통",1.5:"넓게","2.0":"아주 넓게"}},nl:{lineheight:"Regelhoogte",lineheights:{.9:"Klein",normal:"Normaal",1.5:"Groot","2.0":"Extra groot"}},pt_br:{lineheight:"Altura de linha",lineheights:{.9:"Pequena",normal:"Regular",1.5:"Grande","2.0":"Extra grande"}},ru:{lineheight:"Межстрочный интервал",lineheights:{.9:"Маленький",normal:"Обычный",1.5:"Большой","2.0":"Очень большой"}},sl:{lineheight:"Višina vrstice",lineheights:{.9:"Majhna",normal:"Navadna",1.5:"Velika","2.0":"Ekstra velika"}},tr:{lineheight:"Satır yüksekliği",lineheights:{.9:"Küçük",normal:"Normal",1.5:"Büyük","2.0":"Çok Büyük"}},zh_tw:{lineheight:"文字間距",lineheights:{.9:"小",normal:"正常",1.5:"大","2.0":"特大"}}}});var i={sizeList:["0.9","normal","1.5","2.0"]};function n(i){var n=[];return e.each(i.o.plugins.lineheight.sizeList,(function(t,l){i.addBtnDef("lineheight_"+l,{text:i.lang.lineheights[l]||l,hasIcon:!1,fn:function(){if(i.saveRange(),""!==i.getRangeText().replace(/\s/g,""))try{var n=function(){var e,i=null;window.getSelection?(e=window.getSelection()).rangeCount&&1!==(i=e.getRangeAt(0).commonAncestorContainer).nodeType&&(i=i.parentNode):(e=document.selection)&&"Control"!==e.type&&(i=e.createRange().parentElement());return i}();e(n).css("lineHeight",l)}catch(e){}}}),n.push("lineheight_"+l)})),n}e.extend(!0,e.trumbowyg,{plugins:{lineheight:{init:function(t){t.o.plugins.lineheight=e.extend({},i,t.o.plugins.lineheight||{}),t.addBtnDef("lineheight",{dropdown:n(t)})}}}})}(jQuery);
|
@@ -7,7 +7,7 @@
|
|
7
7
|
*/
|
8
8
|
|
9
9
|
/* globals MathJax */
|
10
|
-
(function($) {
|
10
|
+
(function ($) {
|
11
11
|
'use strict';
|
12
12
|
$.extend(true, $.trumbowyg, {
|
13
13
|
langs: {
|
@@ -17,11 +17,36 @@
|
|
17
17
|
formulas: 'Formulas',
|
18
18
|
inline: 'Inline'
|
19
19
|
},
|
20
|
+
az: {
|
21
|
+
mathml: 'Düstur əlavə et',
|
22
|
+
formulas: 'Düsturlar',
|
23
|
+
inline: 'Sətir içi'
|
24
|
+
},
|
25
|
+
by: {
|
26
|
+
mathml: 'Уставіць формулу',
|
27
|
+
formulas: 'Формула',
|
28
|
+
inline: 'Inline-элемент'
|
29
|
+
},
|
30
|
+
ca: {
|
31
|
+
mathml: 'Inserir Fórmula',
|
32
|
+
formulas: 'Fórmula',
|
33
|
+
inline: 'En línia'
|
34
|
+
},
|
20
35
|
da: {
|
21
36
|
mathml: 'Indsæt formler',
|
22
37
|
formulas: 'Formler',
|
23
38
|
inline: 'Inline'
|
24
39
|
},
|
40
|
+
de: {
|
41
|
+
mathml: 'Formel einfügen',
|
42
|
+
formulas: 'Formel',
|
43
|
+
inline: 'Innerhalb der Zeile'
|
44
|
+
},
|
45
|
+
es: {
|
46
|
+
mathml: 'Insertar Fórmula',
|
47
|
+
formulas: 'Fórmula',
|
48
|
+
inline: 'En línea'
|
49
|
+
},
|
25
50
|
et: {
|
26
51
|
mathml: 'Sisesta valem',
|
27
52
|
formulas: 'Valemid',
|
@@ -47,6 +72,16 @@
|
|
47
72
|
formulas: 'Fórmulas',
|
48
73
|
inline: 'Em linha'
|
49
74
|
},
|
75
|
+
ru: {
|
76
|
+
mathml: 'Вставить формулу',
|
77
|
+
formulas: 'Формула',
|
78
|
+
inline: 'Строчный элемент'
|
79
|
+
},
|
80
|
+
sl: {
|
81
|
+
mathml: 'Vstavi matematični izraz',
|
82
|
+
formulas: 'Formula',
|
83
|
+
inline: 'V vrstici'
|
84
|
+
},
|
50
85
|
tr: {
|
51
86
|
mathml: 'Formül Ekle',
|
52
87
|
formulas: 'Formüller',
|
@@ -62,63 +97,75 @@
|
|
62
97
|
|
63
98
|
plugins: {
|
64
99
|
mathml: {
|
65
|
-
init: function(trumbowyg) {
|
66
|
-
var
|
67
|
-
|
68
|
-
trumbowyg.
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
required: false,
|
82
|
-
}
|
83
|
-
};
|
100
|
+
init: function (trumbowyg) {
|
101
|
+
var mathMlOptions = {
|
102
|
+
formulas: {
|
103
|
+
label: trumbowyg.lang.formulas,
|
104
|
+
required: true,
|
105
|
+
value: ''
|
106
|
+
},
|
107
|
+
inline: {
|
108
|
+
label: trumbowyg.lang.inline,
|
109
|
+
attributes: {
|
110
|
+
checked: true
|
111
|
+
},
|
112
|
+
type: 'checkbox',
|
113
|
+
required: false,
|
114
|
+
}
|
115
|
+
};
|
84
116
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
trumbowyg.currentMathNode = this;
|
97
|
-
mathMLoptions.formulas.value = $(this).attr('formulas');
|
117
|
+
var mathmlCallback = function (v) {
|
118
|
+
var delimiter = v.inline ? '$' : '$$';
|
119
|
+
if (trumbowyg.currentMathNode) {
|
120
|
+
$(trumbowyg.currentMathNode)
|
121
|
+
.html(delimiter + ' ' + v.formulas + ' ' + delimiter)
|
122
|
+
.attr('formulas', v.formulas)
|
123
|
+
.attr('inline', (v.inline ? 'true' : 'false'));
|
124
|
+
} else {
|
125
|
+
var html = '<span contenteditable="false" formulas="' + v.formulas + '" inline="' + (v.inline ? 'true' : 'false') + '" >' + delimiter + ' ' + v.formulas + ' ' + delimiter + '</span>';
|
126
|
+
var node = $(html)[0];
|
127
|
+
node.onclick = openModal;
|
98
128
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
129
|
+
trumbowyg.range.deleteContents();
|
130
|
+
trumbowyg.range.insertNode(node);
|
131
|
+
}
|
132
|
+
|
133
|
+
trumbowyg.currentMathNode = false;
|
134
|
+
MathJax.Hub.Queue(['Typeset', MathJax.Hub]);
|
135
|
+
return true;
|
136
|
+
};
|
104
137
|
|
105
|
-
|
106
|
-
|
138
|
+
var openModal = function () {
|
139
|
+
trumbowyg.currentMathNode = this;
|
140
|
+
mathMlOptions.formulas.value = $(this).attr('formulas');
|
107
141
|
|
108
|
-
|
109
|
-
|
110
|
-
|
142
|
+
if ($(this).attr('inline') === 'true') {
|
143
|
+
mathMlOptions.inline.attributes.checked = true;
|
144
|
+
} else {
|
145
|
+
delete mathMlOptions.inline.attributes.checked;
|
146
|
+
}
|
111
147
|
|
112
|
-
|
113
|
-
|
114
|
-
return true;
|
115
|
-
};
|
148
|
+
trumbowyg.openModalInsert(trumbowyg.lang.mathml, mathMlOptions, mathmlCallback);
|
149
|
+
};
|
116
150
|
|
117
|
-
|
118
|
-
|
119
|
-
trumbowyg.
|
151
|
+
var btnDef = {
|
152
|
+
fn: function () {
|
153
|
+
trumbowyg.saveRange();
|
154
|
+
|
155
|
+
mathMlOptions.formulas.value = trumbowyg.getRangeText();
|
156
|
+
mathMlOptions.inline.attributes.checked = true;
|
157
|
+
trumbowyg.openModalInsert(trumbowyg.lang.mathml, mathMlOptions, mathmlCallback);
|
120
158
|
}
|
121
159
|
};
|
160
|
+
|
161
|
+
trumbowyg.$ta.on('tbwinit', function () {
|
162
|
+
var nodes = trumbowyg.$ed.find('[formulas]');
|
163
|
+
|
164
|
+
nodes.each(function (i, elem) {
|
165
|
+
elem.onclick = openModal;
|
166
|
+
});
|
167
|
+
});
|
168
|
+
|
122
169
|
trumbowyg.addBtnDef('mathml', btnDef);
|
123
170
|
}
|
124
171
|
}
|
@@ -1 +1,8 @@
|
|
1
|
-
|
1
|
+
/* ===========================================================
|
2
|
+
* trumbowyg.mathMl.js v1.0
|
3
|
+
* MathML plugin for Trumbowyg
|
4
|
+
* http://alex-d.github.com/Trumbowyg
|
5
|
+
* ===========================================================
|
6
|
+
* Author : loclamor
|
7
|
+
*/
|
8
|
+
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{mathml:"Insert Formulas",formulas:"Formulas",inline:"Inline"},az:{mathml:"Düstur əlavə et",formulas:"Düsturlar",inline:"Sətir içi"},by:{mathml:"Уставіць формулу",formulas:"Формула",inline:"Inline-элемент"},ca:{mathml:"Inserir Fórmula",formulas:"Fórmula",inline:"En línia"},da:{mathml:"Indsæt formler",formulas:"Formler",inline:"Inline"},de:{mathml:"Formel einfügen",formulas:"Formel",inline:"Innerhalb der Zeile"},es:{mathml:"Insertar Fórmula",formulas:"Fórmula",inline:"En línea"},et:{mathml:"Sisesta valem",formulas:"Valemid",inline:"Teksti sees"},fr:{mathml:"Inserer une formule",formulas:"Formule",inline:"En ligne"},hu:{mathml:"Formulák beszúrás",formulas:"Formulák",inline:"Inline"},ko:{mathml:"수식 넣기",formulas:"수식",inline:"글 안에 넣기"},pt_br:{mathml:"Inserir fórmulas",formulas:"Fórmulas",inline:"Em linha"},ru:{mathml:"Вставить формулу",formulas:"Формула",inline:"Строчный элемент"},sl:{mathml:"Vstavi matematični izraz",formulas:"Formula",inline:"V vrstici"},tr:{mathml:"Formül Ekle",formulas:"Formüller",inline:"Satır içi"},zh_tw:{mathml:"插入方程式",formulas:"方程式",inline:"內嵌"}},plugins:{mathml:{init:function(l){var n={formulas:{label:l.lang.formulas,required:!0,value:""},inline:{label:l.lang.inline,attributes:{checked:!0},type:"checkbox",required:!1}},a=function(n){var a=n.inline?"$":"$$";if(l.currentMathNode)e(l.currentMathNode).html(a+" "+n.formulas+" "+a).attr("formulas",n.formulas).attr("inline",n.inline?"true":"false");else{var i='<span contenteditable="false" formulas="'+n.formulas+'" inline="'+(n.inline?"true":"false")+'" >'+a+" "+n.formulas+" "+a+"</span>",t=e(i)[0];t.onclick=r,l.range.deleteContents(),l.range.insertNode(t)}return l.currentMathNode=!1,MathJax.Hub.Queue(["Typeset",MathJax.Hub]),!0},r=function(){l.currentMathNode=this,n.formulas.value=e(this).attr("formulas"),"true"===e(this).attr("inline")?n.inline.attributes.checked=!0:delete n.inline.attributes.checked,l.openModalInsert(l.lang.mathml,n,a)},i={fn:function(){l.saveRange(),n.formulas.value=l.getRangeText(),n.inline.attributes.checked=!0,l.openModalInsert(l.lang.mathml,n,a)}};l.$ta.on("tbwinit",(function(){l.$ed.find("[formulas]").each((function(e,l){l.onclick=r}))})),l.addBtnDef("mathml",i)}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/sass/trumbowyg.mathml.scss
CHANGED
@@ -1,36 +1,41 @@
|
|
1
1
|
/**
|
2
|
-
* Trumbowyg v2.
|
3
|
-
*
|
2
|
+
* Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
|
3
|
+
* Trumbowyg plugin stylesheet
|
4
4
|
* ------------------------
|
5
|
-
* @link
|
5
|
+
* @link https://alex-d.github.io/Trumbowyg/
|
6
6
|
* @license MIT
|
7
7
|
* @author Alexandre Demode (Alex-D)
|
8
8
|
* Twitter : @AlexandreDemode
|
9
9
|
* Website : alex-d.fr
|
10
10
|
*/
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
display: block;
|
17
|
-
width: 100%;
|
18
|
-
}
|
19
|
-
|
20
|
-
&:hover {
|
21
|
-
pointer-events: none;
|
12
|
+
[formulas] {
|
13
|
+
position: relative;
|
14
|
+
display: inline-block;
|
15
|
+
pointer-events: none;
|
22
16
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
17
|
+
&[inline="false"] {
|
18
|
+
display: block;
|
19
|
+
width: 100%;
|
20
|
+
}
|
21
|
+
|
22
|
+
&::after {
|
23
|
+
content: '\270E';
|
24
|
+
position: absolute;
|
25
|
+
top: 0;
|
26
|
+
right: 0;
|
27
|
+
bottom: 0;
|
28
|
+
left: 0;
|
29
|
+
opacity: 0;
|
30
|
+
background-color: rgba(255, 255, 255, 0.83);
|
31
|
+
box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
|
32
|
+
cursor: pointer;
|
33
|
+
pointer-events: auto;
|
34
|
+
}
|
35
|
+
|
36
|
+
&:hover {
|
37
|
+
&::after {
|
38
|
+
opacity: 1;
|
39
|
+
}
|
40
|
+
}
|
36
41
|
}
|
@@ -1,30 +1,38 @@
|
|
1
1
|
/**
|
2
|
-
* Trumbowyg v2.
|
2
|
+
* Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
|
3
3
|
* Trumbowyg plugin stylesheet
|
4
4
|
* ------------------------
|
5
|
-
* @link
|
5
|
+
* @link https://alex-d.github.io/Trumbowyg/
|
6
6
|
* @license MIT
|
7
7
|
* @author Alexandre Demode (Alex-D)
|
8
8
|
* Twitter : @AlexandreDemode
|
9
9
|
* Website : alex-d.fr
|
10
10
|
*/
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
12
|
+
@charset "UTF-8";
|
13
|
+
[formulas] {
|
14
|
+
position: relative;
|
15
|
+
display: inline-block;
|
16
|
+
pointer-events: none;
|
17
|
+
}
|
18
|
+
[formulas][inline=false] {
|
19
|
+
display: block;
|
20
|
+
width: 100%;
|
21
|
+
}
|
22
|
+
[formulas]::after {
|
23
|
+
content: "✎";
|
24
|
+
position: absolute;
|
25
|
+
top: 0;
|
26
|
+
right: 0;
|
27
|
+
bottom: 0;
|
28
|
+
left: 0;
|
29
|
+
opacity: 0;
|
30
|
+
background-color: rgba(255, 255, 255, 0.83);
|
31
|
+
-webkit-box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
|
32
|
+
box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
|
33
|
+
cursor: pointer;
|
34
|
+
pointer-events: auto;
|
35
|
+
}
|
36
|
+
[formulas]:hover::after {
|
37
|
+
opacity: 1;
|
38
|
+
}
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
/** Trumbowyg v2.
|
2
|
-
|
1
|
+
/** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
|
2
|
+
@charset "UTF-8";[formulas]{position:relative;display:inline-block;pointer-events:none}[formulas][inline=false]{display:block;width:100%}[formulas]::after{content:"✎";position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;background-color:rgba(255,255,255,.83);-webkit-box-shadow:0 0 5px 5px rgba(255,255,255,.83);box-shadow:0 0 5px 5px rgba(255,255,255,.83);cursor:pointer;pointer-events:auto}[formulas]:hover::after{opacity:1}
|
@@ -23,9 +23,18 @@
|
|
23
23
|
en: {
|
24
24
|
mention: 'Mention'
|
25
25
|
},
|
26
|
+
az: {
|
27
|
+
mention: 'Bildirmək'
|
28
|
+
},
|
29
|
+
by: {
|
30
|
+
mention: 'Згадаць'
|
31
|
+
},
|
26
32
|
da: {
|
27
33
|
mention: 'Nævn'
|
28
34
|
},
|
35
|
+
de: {
|
36
|
+
mention: 'Erwähnung'
|
37
|
+
},
|
29
38
|
et: {
|
30
39
|
mention: 'Maini'
|
31
40
|
},
|
@@ -44,6 +53,9 @@
|
|
44
53
|
ru: {
|
45
54
|
mention: 'Упомянуть'
|
46
55
|
},
|
56
|
+
sl: {
|
57
|
+
mention: 'Omeni'
|
58
|
+
},
|
47
59
|
tr: {
|
48
60
|
mention: 'Bahset'
|
49
61
|
},
|
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
/* ===========================================================
|
2
|
+
* trumbowyg.mention.js v0.1
|
3
|
+
* Mention plugin for Trumbowyg
|
4
|
+
* http://alex-d.github.com/Trumbowyg
|
5
|
+
* ===========================================================
|
6
|
+
* Author : Viper
|
7
|
+
* Github: https://github.com/Globulopolis
|
8
|
+
* Website: http://киноархив.com
|
9
|
+
*/
|
10
|
+
!function(n){"use strict";var t={source:[],formatDropdownItem:function(n){return n.login},formatResult:function(n){return"@"+n.login+" "}};function e(t,e){var o=[];return n.each(t,(function(n,t){var i="mention-"+n,m={hasIcon:!1,text:e.o.plugins.mention.formatDropdownItem(t),fn:function(){return e.execCmd("insertHTML",e.o.plugins.mention.formatResult(t)),!0}};e.addBtnDef(i,m),o.push(i)})),o}n.extend(!0,n.trumbowyg,{langs:{en:{mention:"Mention"},az:{mention:"Bildirmək"},by:{mention:"Згадаць"},da:{mention:"Nævn"},de:{mention:"Erwähnung"},et:{mention:"Maini"},fr:{mention:"Mentionner"},hu:{mention:"Említ"},ko:{mention:"언급"},pt_br:{mention:"Menção"},ru:{mention:"Упомянуть"},sl:{mention:"Omeni"},tr:{mention:"Bahset"},zh_tw:{mention:"標記"}},plugins:{mention:{init:function(o){o.o.plugins.mention=n.extend(!0,{},t,o.o.plugins.mention||{});var i={dropdown:e(o.o.plugins.mention.source,o)};o.addBtnDef("mention",i)}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/sass/trumbowyg.mention.scss
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/**
|
2
|
-
* Trumbowyg v2.
|
3
|
-
*
|
2
|
+
* Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
|
3
|
+
* Trumbowyg plugin stylesheet
|
4
4
|
* ------------------------
|
5
|
-
* @link
|
5
|
+
* @link https://alex-d.github.io/Trumbowyg/
|
6
6
|
* @license MIT
|
7
7
|
* @author Alexandre Demode (Alex-D)
|
8
8
|
* Twitter : @AlexandreDemode
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/**
|
2
|
-
* Trumbowyg v2.
|
2
|
+
* Trumbowyg v2.31.0 - A lightweight WYSIWYG editor
|
3
3
|
* Trumbowyg plugin stylesheet
|
4
4
|
* ------------------------
|
5
|
-
* @link
|
5
|
+
* @link https://alex-d.github.io/Trumbowyg/
|
6
6
|
* @license MIT
|
7
7
|
* @author Alexandre Demode (Alex-D)
|
8
8
|
* Twitter : @AlexandreDemode
|
@@ -11,18 +11,17 @@
|
|
11
11
|
|
12
12
|
.trumbowyg-dropdown-mention button {
|
13
13
|
position: relative;
|
14
|
-
white-space: nowrap;
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
pointer-events: none; }
|
14
|
+
white-space: nowrap;
|
15
|
+
}
|
16
|
+
.trumbowyg-dropdown-mention button:after {
|
17
|
+
content: "";
|
18
|
+
position: absolute;
|
19
|
+
top: 0;
|
20
|
+
right: 0;
|
21
|
+
width: 15%;
|
22
|
+
height: 100%;
|
23
|
+
background-size: 100%;
|
24
|
+
background-image: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(80%, #ffffff), to(#ffffff));
|
25
|
+
background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 80%, #ffffff 100%);
|
26
|
+
pointer-events: none;
|
27
|
+
}
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
/** Trumbowyg v2.
|
2
|
-
.trumbowyg-dropdown-mention button{position:relative;white-space:nowrap}.trumbowyg-dropdown-mention button:after{content:"";position:absolute;top:0;right:0;width:15%;height:100
|
1
|
+
/** Trumbowyg v2.31.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg/ - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
|
2
|
+
.trumbowyg-dropdown-mention button{position:relative;white-space:nowrap}.trumbowyg-dropdown-mention button:after{content:"";position:absolute;top:0;right:0;width:15%;height:100%;background-size:100%;background-image:-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0)),color-stop(80%,#fff),to(#fff));background-image:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 80%,#fff 100%);pointer-events:none}
|