activeadmin_trumbowyg 0.2.12 → 1.0.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 +21 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/bn.js +62 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/bn.min.js +9 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/et.js +65 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/et.min.js +9 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.js +9 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/langs/sl.min.js +7 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.js +3 -3
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/allowtagsfrompaste/trumbowyg.allowtagsfrompaste.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.js +6 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/base64/trumbowyg.base64.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/cleanpaste/trumbowyg.cleanpaste.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.js +10 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/trumbowyg.colors.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/sass/trumbowyg.colors.scss +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.css +3 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/colors/ui/trumbowyg.colors.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.js +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/trumbowyg.emoji.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/sass/trumbowyg.emoji.scss +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.css +3 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/emoji/ui/trumbowyg.emoji.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/fontfamily/trumbowyg.fontfamily.js +4 -1
- 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 +25 -4
- 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 +6 -0
- 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 +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/giphy/ui/trumbowyg.giphy.css +13 -6
- 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 +223 -22
- 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 +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.css +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.js +6 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/history/trumbowyg.history.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.js +9 -5
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/indent/trumbowyg.indent.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.js +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.js +9 -0
- 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 +5 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/sass/trumbowyg.mathml.scss +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.css +3 -2
- 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 +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/trumbowyg.mention.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/sass/trumbowyg.mention.scss +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mention/ui/trumbowyg.mention.css +6 -2
- 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 +4 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/noembed/trumbowyg.noembed.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.js +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/preformatted/trumbowyg.preformatted.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.js +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/trumbowyg.resizimg.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.js +5 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/ruby/trumbowyg.ruby.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.js +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/trumbowyg.specialchars.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.css +3 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/specialchars/ui/trumbowyg.specialchars.min.css +2 -2
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.js +28 -4
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/trumbowyg.table.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/sass/trumbowyg.table.scss +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/table/ui/trumbowyg.table.css +5 -3
- 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 +3 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/template/trumbowyg.template.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.js +5 -0
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/upload/trumbowyg.upload.min.js +1 -1
- data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.js +26 -17
- data/app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.min.js +12 -2
- data/app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.scss +68 -56
- data/lib/activeadmin/trumbowyg/version.rb +1 -2
- metadata +14 -148
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.js +0 -20
- data/app/assets/javascripts/activeadmin/trumbowyg/plugins/resizimg/resizable-resolveconflict.min.js +0 -1
@@ -3,7 +3,182 @@
|
|
3
3
|
'use strict';
|
4
4
|
|
5
5
|
// My plugin default options
|
6
|
-
var defaultOptions = {
|
6
|
+
var defaultOptions = {
|
7
|
+
enableLineHighlight: true,
|
8
|
+
languageNames: {
|
9
|
+
// For updated list of languages
|
10
|
+
// see https://github.com/PrismJS/prism/blob/master/plugins/show-language/prism-show-language.js
|
11
|
+
'html': 'HTML',
|
12
|
+
'xml': 'XML',
|
13
|
+
'svg': 'SVG',
|
14
|
+
'mathml': 'MathML',
|
15
|
+
'ssml': 'SSML',
|
16
|
+
'css': 'CSS',
|
17
|
+
'clike': 'C-like',
|
18
|
+
'js': 'JavaScript',
|
19
|
+
'abap': 'ABAP',
|
20
|
+
'abnf': 'Augmented Backus–Naur form',
|
21
|
+
'al': 'AL',
|
22
|
+
'antlr4': 'ANTLR4',
|
23
|
+
'g4': 'ANTLR4',
|
24
|
+
'apacheconf': 'Apache Configuration',
|
25
|
+
'apl': 'APL',
|
26
|
+
'aql': 'AQL',
|
27
|
+
'arff': 'ARFF',
|
28
|
+
'asciidoc': 'AsciiDoc',
|
29
|
+
'adoc': 'AsciiDoc',
|
30
|
+
'asm6502': '6502 Assembly',
|
31
|
+
'aspnet': 'ASP.NET (C#)',
|
32
|
+
'autohotkey': 'AutoHotkey',
|
33
|
+
'autoit': 'AutoIt',
|
34
|
+
'basic': 'BASIC',
|
35
|
+
'bbcode': 'BBcode',
|
36
|
+
'bnf': 'Backus–Naur form',
|
37
|
+
'rbnf': 'Routing Backus–Naur form',
|
38
|
+
'conc': 'Concurnas',
|
39
|
+
'csharp': 'C#',
|
40
|
+
'cs': 'C#',
|
41
|
+
'dotnet': 'C#',
|
42
|
+
'cpp': 'C++',
|
43
|
+
'cil': 'CIL',
|
44
|
+
'coffee': 'CoffeeScript',
|
45
|
+
'cmake': 'CMake',
|
46
|
+
'csp': 'Content-Security-Policy',
|
47
|
+
'css-extras': 'CSS Extras',
|
48
|
+
'dax': 'DAX',
|
49
|
+
'django': 'Django/Jinja2',
|
50
|
+
'jinja2': 'Django/Jinja2',
|
51
|
+
'dns-zone-file': 'DNS zone file',
|
52
|
+
'dns-zone': 'DNS zone file',
|
53
|
+
'dockerfile': 'Docker',
|
54
|
+
'ebnf': 'Extended Backus–Naur form',
|
55
|
+
'ejs': 'EJS',
|
56
|
+
'etlua': 'Embedded Lua templating',
|
57
|
+
'erb': 'ERB',
|
58
|
+
'excel-formula': 'Excel Formula',
|
59
|
+
'xlsx': 'Excel Formula',
|
60
|
+
'xls': 'Excel Formula',
|
61
|
+
'fsharp': 'F#',
|
62
|
+
'firestore-security-rules': 'Firestore security rules',
|
63
|
+
'ftl': 'FreeMarker Template Language',
|
64
|
+
'gcode': 'G-code',
|
65
|
+
'gdscript': 'GDScript',
|
66
|
+
'gedcom': 'GEDCOM',
|
67
|
+
'glsl': 'GLSL',
|
68
|
+
'gml': 'GameMaker Language',
|
69
|
+
'gamemakerlanguage': 'GameMaker Language',
|
70
|
+
'graphql': 'GraphQL',
|
71
|
+
'hs': 'Haskell',
|
72
|
+
'hcl': 'HCL',
|
73
|
+
'hlsl': 'HLSL',
|
74
|
+
'http': 'HTTP',
|
75
|
+
'hpkp': 'HTTP Public-Key-Pins',
|
76
|
+
'hsts': 'HTTP Strict-Transport-Security',
|
77
|
+
'ichigojam': 'IchigoJam',
|
78
|
+
'iecst': 'Structured Text (IEC 61131-3)',
|
79
|
+
'inform7': 'Inform 7',
|
80
|
+
'javadoc': 'JavaDoc',
|
81
|
+
'javadoclike': 'JavaDoc-like',
|
82
|
+
'javastacktrace': 'Java stack trace',
|
83
|
+
'jq': 'JQ',
|
84
|
+
'jsdoc': 'JSDoc',
|
85
|
+
'js-extras': 'JS Extras',
|
86
|
+
'js-templates': 'JS Templates',
|
87
|
+
'json': 'JSON',
|
88
|
+
'jsonp': 'JSONP',
|
89
|
+
'json5': 'JSON5',
|
90
|
+
'latex': 'LaTeX',
|
91
|
+
'tex': 'TeX',
|
92
|
+
'context': 'ConTeXt',
|
93
|
+
'lilypond': 'LilyPond',
|
94
|
+
'ly': 'LilyPond',
|
95
|
+
'emacs': 'Lisp',
|
96
|
+
'elisp': 'Lisp',
|
97
|
+
'emacs-lisp': 'Lisp',
|
98
|
+
'llvm': 'LLVM IR',
|
99
|
+
'lolcode': 'LOLCODE',
|
100
|
+
'md': 'Markdown',
|
101
|
+
'markup-templating': 'Markup templating',
|
102
|
+
'matlab': 'MATLAB',
|
103
|
+
'mel': 'MEL',
|
104
|
+
'moon': 'MoonScript',
|
105
|
+
'n1ql': 'N1QL',
|
106
|
+
'n4js': 'N4JS',
|
107
|
+
'n4jsd': 'N4JS',
|
108
|
+
'nand2tetris-hdl': 'Nand To Tetris HDL',
|
109
|
+
'nasm': 'NASM',
|
110
|
+
'neon': 'NEON',
|
111
|
+
'nginx': 'nginx',
|
112
|
+
'nsis': 'NSIS',
|
113
|
+
'objectivec': 'Objective-C',
|
114
|
+
'objc': 'Objective-C',
|
115
|
+
'ocaml': 'OCaml',
|
116
|
+
'opencl': 'OpenCL',
|
117
|
+
'parigp': 'PARI/GP',
|
118
|
+
'objectpascal': 'Object Pascal',
|
119
|
+
'pcaxis': 'PC-Axis',
|
120
|
+
'px': 'PC-Axis',
|
121
|
+
'peoplecode': 'PeopleCode',
|
122
|
+
'pcode': 'PeopleCode',
|
123
|
+
'php': 'PHP',
|
124
|
+
'phpdoc': 'PHPDoc',
|
125
|
+
'php-extras': 'PHP Extras',
|
126
|
+
'plsql': 'PL/SQL',
|
127
|
+
'powerquery': 'PowerQuery',
|
128
|
+
'pq': 'PowerQuery',
|
129
|
+
'mscript': 'PowerQuery',
|
130
|
+
'powershell': 'PowerShell',
|
131
|
+
'properties': '.properties',
|
132
|
+
'protobuf': 'Protocol Buffers',
|
133
|
+
'py': 'Python',
|
134
|
+
'q': 'Q (kdb+ database)',
|
135
|
+
'qml': 'QML',
|
136
|
+
'rkt': 'Racket',
|
137
|
+
'jsx': 'React JSX',
|
138
|
+
'tsx': 'React TSX',
|
139
|
+
'renpy': 'Ren\'py',
|
140
|
+
'rest': 'reST (reStructuredText)',
|
141
|
+
'robotframework': 'Robot Framework',
|
142
|
+
'robot': 'Robot Framework',
|
143
|
+
'rb': 'Ruby',
|
144
|
+
'sas': 'SAS',
|
145
|
+
'sass': 'Sass (Sass)',
|
146
|
+
'scss': 'Sass (Scss)',
|
147
|
+
'shell-session': 'Shell session',
|
148
|
+
'solidity': 'Solidity (Ethereum)',
|
149
|
+
'solution-file': 'Solution file',
|
150
|
+
'sln': 'Solution file',
|
151
|
+
'soy': 'Soy (Closure Template)',
|
152
|
+
'sparql': 'SPARQL',
|
153
|
+
'rq': 'SPARQL',
|
154
|
+
'splunk-spl': 'Splunk SPL',
|
155
|
+
'sqf': 'SQF: Status Quo Function (Arma 3)',
|
156
|
+
'sql': 'SQL',
|
157
|
+
'tap': 'TAP',
|
158
|
+
'toml': 'TOML',
|
159
|
+
'tt2': 'Template Toolkit 2',
|
160
|
+
'trig': 'TriG',
|
161
|
+
'ts': 'TypeScript',
|
162
|
+
't4-cs': 'T4 Text Templates (C#)',
|
163
|
+
't4': 'T4 Text Templates (C#)',
|
164
|
+
't4-vb': 'T4 Text Templates (VB)',
|
165
|
+
't4-templating': 'T4 templating',
|
166
|
+
'uscript': 'UnrealScript',
|
167
|
+
'uc': 'UnrealScript',
|
168
|
+
'vbnet': 'VB.Net',
|
169
|
+
'vhdl': 'VHDL',
|
170
|
+
'vim': 'vim',
|
171
|
+
'visual-basic': 'Visual Basic',
|
172
|
+
'vb': 'Visual Basic',
|
173
|
+
'wasm': 'WebAssembly',
|
174
|
+
'wiki': 'Wiki markup',
|
175
|
+
'xeoracube': 'XeoraCube',
|
176
|
+
'xojo': 'Xojo (REALbasic)',
|
177
|
+
'xquery': 'XQuery',
|
178
|
+
'yaml': 'YAML',
|
179
|
+
'yml': 'YAML'
|
180
|
+
}
|
181
|
+
};
|
7
182
|
|
8
183
|
function highlightIt(text, language, lineHighlight) {
|
9
184
|
return [
|
@@ -13,34 +188,58 @@
|
|
13
188
|
].join('');
|
14
189
|
}
|
15
190
|
|
191
|
+
function escapeHtml(html) {
|
192
|
+
return $('<div/>').text(html).html();
|
193
|
+
}
|
194
|
+
|
195
|
+
function buildHighlightOptions(trumbowyg) {
|
196
|
+
var languageNames = trumbowyg.o.plugins.highlight.languageNames;
|
197
|
+
var languageNameKeys = Object.keys(languageNames);
|
198
|
+
var prismLanguageKeys = Object.keys(Prism.languages);
|
199
|
+
|
200
|
+
var options = prismLanguageKeys.filter(function (languageKey) {
|
201
|
+
return languageNameKeys.indexOf(languageKey) >= 0;
|
202
|
+
}).map(function (languageKey) {
|
203
|
+
return {
|
204
|
+
id: languageKey,
|
205
|
+
name: languageNames[languageKey]
|
206
|
+
};
|
207
|
+
}).sort(function(a, b){
|
208
|
+
// Sort languages by name
|
209
|
+
return a.name.localeCompare(b.name);
|
210
|
+
}).map(function( language){
|
211
|
+
// Generate a list of options
|
212
|
+
return '<option value="' + escapeHtml(language.id) + '">' + escapeHtml(language.name) + '</option>';
|
213
|
+
}).join('');
|
214
|
+
|
215
|
+
return options;
|
216
|
+
}
|
217
|
+
|
218
|
+
function buildLineHighlightFieldIfEnabled(trumbowyg) {
|
219
|
+
if (trumbowyg.o.plugins.highlight.enableLineHighlight === false) {
|
220
|
+
return '';
|
221
|
+
}
|
222
|
+
|
223
|
+
return '<div class="' + trumbowyg.o.prefix + 'highlight-form-group">' +
|
224
|
+
' <input placeholder="' + trumbowyg.lang.highlightLine +
|
225
|
+
'" class="' + trumbowyg.o.prefix + 'highlight-form-control trumbowyg-line-highlight"/>' +
|
226
|
+
'</div>';
|
227
|
+
}
|
228
|
+
|
16
229
|
// If my plugin is a button
|
17
230
|
function buildButtonDef(trumbowyg) {
|
18
231
|
return {
|
19
232
|
fn: function () {
|
20
233
|
var $modal = trumbowyg.openModal('Code', [
|
21
234
|
'<div class="' + trumbowyg.o.prefix + 'highlight-form-group">',
|
22
|
-
' <select class="' + trumbowyg.o.prefix + 'highlight-form-control language">',
|
23
|
-
(
|
24
|
-
var options = '';
|
25
|
-
|
26
|
-
for (var lang in Prism.languages) {
|
27
|
-
if (Prism.languages.hasOwnProperty(lang)) {
|
28
|
-
options += '<option value="' + lang + '">' + lang + '</option>';
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
return options;
|
33
|
-
})(),
|
235
|
+
' <select class="' + trumbowyg.o.prefix + 'highlight-form-control language" autofocus>',
|
236
|
+
buildHighlightOptions(trumbowyg),
|
34
237
|
' </select>',
|
35
238
|
'</div>',
|
36
239
|
'<div class="' + trumbowyg.o.prefix + 'highlight-form-group">',
|
37
240
|
' <textarea class="' + trumbowyg.o.prefix + 'highlight-form-control code"></textarea>',
|
38
241
|
'</div>',
|
39
|
-
|
40
|
-
' <input title="'+ trumbowyg.lang.prismHighlightPluginAlert +
|
41
|
-
'" placeholder="' + trumbowyg.lang.highlightLine +
|
42
|
-
'" class="' + trumbowyg.o.prefix + 'highlight-form-control trumbowyg-line-highlight"/>',
|
43
|
-
'</div>'
|
242
|
+
buildLineHighlightFieldIfEnabled(trumbowyg),
|
44
243
|
].join('\n')),
|
45
244
|
$language = $modal.find('.language'),
|
46
245
|
$code = $modal.find('.code'),
|
@@ -68,13 +267,15 @@
|
|
68
267
|
// jshint camelcase:false
|
69
268
|
en: {
|
70
269
|
highlight: 'Code syntax highlight',
|
71
|
-
highlightLine: 'Highlight lines, e.g.: 1,3-5'
|
72
|
-
prismHighlightPluginAlert: 'You must have Prism Line Highlight plugin installed'
|
270
|
+
highlightLine: 'Highlight lines, e.g.: 1,3-5'
|
73
271
|
},
|
74
272
|
es: {
|
75
273
|
highlight: 'Resaltado de sintaxis de código',
|
76
|
-
highlightLine: 'Resaltar lineas, ej: 1,3-5'
|
77
|
-
|
274
|
+
highlightLine: 'Resaltar lineas, ej: 1,3-5'
|
275
|
+
},
|
276
|
+
et: {
|
277
|
+
highlight: 'Koodi esiletoomine',
|
278
|
+
highlightLine: 'Koodiread, näiteks: 1,3-5'
|
78
279
|
},
|
79
280
|
hu: {
|
80
281
|
highlight: 'Kód kiemelés'
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(i
|
1
|
+
!function(e,i){"use strict";var t={enableLineHighlight:!0,languageNames:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"}};function a(i){return e("<div/>").text(i).html()}function o(e){var t=e.o.plugins.highlight.languageNames,o=Object.keys(t);return Object.keys(i.languages).filter((function(e){return o.indexOf(e)>=0})).map((function(e){return{id:e,name:t[e]}})).sort((function(e,i){return e.name.localeCompare(i.name)})).map((function(e){return'<option value="'+a(e.id)+'">'+a(e.name)+"</option>"})).join("")}function l(e){return!1===e.o.plugins.highlight.enableLineHighlight?"":'<div class="'+e.o.prefix+'highlight-form-group"> <input placeholder="'+e.lang.highlightLine+'" class="'+e.o.prefix+'highlight-form-control trumbowyg-line-highlight"/></div>'}function s(e){return{fn:function(){var t=e.openModal("Code",['<div class="'+e.o.prefix+'highlight-form-group">',' <select class="'+e.o.prefix+'highlight-form-control language" autofocus>',o(e)," </select>","</div>",'<div class="'+e.o.prefix+'highlight-form-group">',' <textarea class="'+e.o.prefix+'highlight-form-control code"></textarea>',"</div>",l(e)].join("\n")),a=t.find(".language"),s=t.find(".code"),n=t.find(".trumbowyg-line-highlight");t.on("tbwconfirm",(function(){var t,o,l;e.restoreRange(),e.execCmd("insertHTML",(t=s.val(),o=a.val(),l=n.val(),['<pre class="language-'+o+'" '+(l?'data-line="'+l+'"':"")+">",'<code class="language-'+o+'">'+i.highlight(t,i.languages[o])+"</code>","</pre>"].join(""))),e.execCmd("insertHTML","<p><br></p>"),e.closeModal()})),t.on("tbwcancel",(function(){e.closeModal()}))}}}e.extend(!0,e.trumbowyg,{langs:{en:{highlight:"Code syntax highlight",highlightLine:"Highlight lines, e.g.: 1,3-5"},es:{highlight:"Resaltado de sintaxis de código",highlightLine:"Resaltar lineas, ej: 1,3-5"},et:{highlight:"Koodi esiletoomine",highlightLine:"Koodiread, näiteks: 1,3-5"},hu:{highlight:"Kód kiemelés"},ko:{highlight:"코드 문법 하이라이트"},pt_br:{highlight:"Realçar sintaxe de código"}},plugins:{highlight:{init:function(i){i.o.plugins.highlight=e.extend(!0,{},t,i.o.plugins.highlight||{}),i.addBtnDef("highlight",s(i))}}}})}(jQuery,Prism);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/ui/trumbowyg.highlight.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
/** Trumbowyg v2.
|
1
|
+
/** Trumbowyg v2.25.1 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
|
2
2
|
.trumbowyg-highlight-form-group{margin:15px 10px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control{width:100%;border:1px solid #DEDEDE;font-size:14px;padding:7px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control.code{height:200px}
|
@@ -1 +1 @@
|
|
1
|
-
!function(o){"use strict";o.extend(!0,o.trumbowyg,{langs:{en:{history:{redo:"Redo",undo:"Undo"}},da:{history:{redo:"Annuller fortryd",undo:"Fortryd"}},de:{history:{redo:"Wiederholen",undo:"Rückgängig"}},fr:{history:{redo:"Annuler",undo:"Rétablir"}},hu:{history:{redo:"Visszállít",undo:"Visszavon"}},ko:{history:{redo:"다시 실행",undo:"되돌리기"}},pt_br:{history:{redo:"Refazer",undo:"Desfazer"}},zh_tw:{history:{redo:"重做",undo:"復原"}}},plugins:{history:{init:function(i){i.o.plugins.history=o.extend(!0,{_stack:[],_index:-1,_focusEl:void 0},i.o.plugins.history||{});var t={title:i.lang.history.redo,ico:"redo",key:"Y",fn:function(){if(i.o.plugins.history._index<i.o.plugins.history._stack.length-1){i.o.plugins.history._index+=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),
|
1
|
+
!function(o){"use strict";o.extend(!0,o.trumbowyg,{langs:{en:{history:{redo:"Redo",undo:"Undo"}},da:{history:{redo:"Annuller fortryd",undo:"Fortryd"}},de:{history:{redo:"Wiederholen",undo:"Rückgängig"}},et:{history:{redo:"Võta tagasi",undo:"Tee uuesti"}},fr:{history:{redo:"Annuler",undo:"Rétablir"}},hu:{history:{redo:"Visszállít",undo:"Visszavon"}},ko:{history:{redo:"다시 실행",undo:"되돌리기"}},pt_br:{history:{redo:"Refazer",undo:"Desfazer"}},zh_tw:{history:{redo:"重做",undo:"復原"}}},plugins:{history:{init:function(i){i.o.plugins.history=o.extend(!0,{_stack:[],_index:-1,_focusEl:void 0},i.o.plugins.history||{});var t={title:i.lang.history.redo,ico:"redo",key:"Y",fn:function(){if(i.o.plugins.history._index<i.o.plugins.history._stack.length-1){i.o.plugins.history._index+=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),d(),e()}}},n={title:i.lang.history.undo,ico:"undo",key:"Z",fn:function(){if(i.o.plugins.history._index>0){i.o.plugins.history._index-=1;var o=i.o.plugins.history._index,t=i.o.plugins.history._stack[o];i.execCmd("html",t),i.o.plugins.history._stack[o]=i.$ed.html(),d(),e()}}},e=function(){var o=i.o.plugins.history._index,t=i.o.plugins.history._stack.length,n=0!==t&&o!==t-1;s("historyUndo",o>0),s("historyRedo",n)},s=function(o,t){var n=i.$box.find(".trumbowyg-"+o+"-button");t?n.removeClass("trumbowyg-disable"):n.hasClass("trumbowyg-disable")||n.addClass("trumbowyg-disable")},r=function(o,i){if(o===i)return!0;if(null==o||null==i)return!1;if(o.length!==i.length)return!1;for(var t=0;t<o.length;t+=1)if(o[t]!==i[t])return!1;return!0},d=function(){var o=i.doc.getSelection().focusNode,t=i.doc.createRange();o.childNodes.length>0&&(t.setStartAfter(o.childNodes[o.childNodes.length-1]),t.setEndAfter(o.childNodes[o.childNodes.length-1]),i.doc.getSelection().removeAllRanges(),i.doc.getSelection().addRange(t))};i.$c.on("tbwinit tbwchange",(function(){var t,n,s=i.o.plugins.history._index,d=i.o.plugins.history._stack,l=d.slice(-1)[0]||"<p></p>",u=d[s],h=i.$ed.html(),c=i.doc.getSelection().focusNode,a="",g=i.o.plugins.history._focusEl;t=o("<div>"+l+"</div>").find("*").map((function(){return this.localName})),n=o("<div>"+h+"</div>").find("*").map((function(){return this.localName})),c&&(i.o.plugins.history._focusEl=c,a=c.outerHTML||c.textContent),h!==u&&(a.slice(-1).match(/\s/)||!r(t,n)||i.o.plugins.history._index<=0||c!==g?(i.o.plugins.history._index+=1,i.o.plugins.history._stack=d.slice(0,i.o.plugins.history._index),i.o.plugins.history._stack.push(h)):i.o.plugins.history._stack[s]=h,e())})),i.addBtnDef("historyRedo",t),i.addBtnDef("historyUndo",n)}}}})}(jQuery);
|
@@ -15,7 +15,11 @@
|
|
15
15
|
langs: {
|
16
16
|
en: {
|
17
17
|
indent: 'Indent',
|
18
|
-
outdent: 'Outdent'
|
18
|
+
outdent: 'Outdent'
|
19
|
+
},
|
20
|
+
et: {
|
21
|
+
indent: 'Taande suurendamine',
|
22
|
+
outdent: 'Taande vähendamine'
|
19
23
|
},
|
20
24
|
fr: {
|
21
25
|
indent: 'Augmenter le retrait',
|
@@ -32,8 +36,8 @@
|
|
32
36
|
var indentBtnDef = {
|
33
37
|
fn: 'indent',
|
34
38
|
title: trumbowyg.lang.indent,
|
35
|
-
isSupported: function () {
|
36
|
-
return !!document.queryCommandSupported && !!document.queryCommandSupported('indent');
|
39
|
+
isSupported: function () {
|
40
|
+
return !!document.queryCommandSupported && !!document.queryCommandSupported('indent');
|
37
41
|
},
|
38
42
|
ico: 'indent'
|
39
43
|
};
|
@@ -41,8 +45,8 @@
|
|
41
45
|
var outdentBtnDef = {
|
42
46
|
fn: 'outdent',
|
43
47
|
title: trumbowyg.lang.outdent,
|
44
|
-
isSupported: function () {
|
45
|
-
return !!document.queryCommandSupported && !!document.queryCommandSupported('outdent');
|
48
|
+
isSupported: function () {
|
49
|
+
return !!document.queryCommandSupported && !!document.queryCommandSupported('outdent');
|
46
50
|
},
|
47
51
|
ico: 'outdent'
|
48
52
|
};
|
@@ -1 +1 @@
|
|
1
|
-
!function(
|
1
|
+
!function(n){"use strict";n.extend(!0,n.trumbowyg,{langs:{en:{indent:"Indent",outdent:"Outdent"},et:{indent:"Taande suurendamine",outdent:"Taande vähendamine"},fr:{indent:"Augmenter le retrait",outdent:"Diminuer le retrait"}}}),n.extend(!0,n.trumbowyg,{plugins:{paragraph:{init:function(n){var t={fn:"indent",title:n.lang.indent,isSupported:function(){return!!document.queryCommandSupported&&!!document.queryCommandSupported("indent")},ico:"indent"},e={fn:"outdent",title:n.lang.outdent,isSupported:function(){return!!document.queryCommandSupported&&!!document.queryCommandSupported("outdent")},ico:"outdent"};n.addBtnDef("indent",t),n.addBtnDef("outdent",e)}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/insertaudio/trumbowyg.insertaudio.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},da:{insertAudio:"Indsæt lyd"},fr:{insertAudio:"Insérer un son"},hu:{insertAudio:"Audio beszúrás"},ja:{insertAudio:"音声の挿入"},ko:{insertAudio:"소리 넣기"},pt_br:{insertAudio:"Inserir áudio"},ru:{insertAudio:"Вставить аудио"},tr:{insertAudio:"Ses Ekle"}},plugins:{insertAudio:{init:function(i){var
|
1
|
+
!function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},da:{insertAudio:"Indsæt lyd"},et:{insertAudio:"Lisa helifail"},fr:{insertAudio:"Insérer un son"},hu:{insertAudio:"Audio beszúrás"},ja:{insertAudio:"音声の挿入"},ko:{insertAudio:"소리 넣기"},pt_br:{insertAudio:"Inserir áudio"},ru:{insertAudio:"Вставить аудио"},tr:{insertAudio:"Ses Ekle"}},plugins:{insertAudio:{init:function(i){var t={fn:function(){i.openModalInsert(i.lang.insertAudio,r,(function(r){var t="<audio controls";r.src&&(t+=" src='"+r.src+"'"),r.autoplay&&(t+=" autoplay"),r.muted&&(t+=" muted"),r.preload&&(t+=" preload='"+r+"'");var n=e(t+="></audio>")[0];return i.range.deleteContents(),i.range.insertNode(n),!0}))}};i.addBtnDef("insertAudio",t)}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/lineheight/trumbowyg.lineheight.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";
|
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 n={sizeList:["0.9","normal","1.5","2.0"]};function i(n){var i=[];return e.each(n.o.plugins.lineheight.sizeList,(function(t,l){n.addBtnDef("lineheight_"+l,{text:n.lang.lineheights[l]||l,hasIcon:!1,fn:function(){if(n.saveRange(),""!==n.getRangeText().replace(/\s/g,""))try{var i=function(){var e,n=null;window.getSelection?(e=window.getSelection()).rangeCount&&1!==(n=e.getRangeAt(0).commonAncestorContainer).nodeType&&(n=n.parentNode):(e=document.selection)&&"Control"!==e.type&&(n=e.createRange().parentElement());return n}();e(i).css("lineHeight",l)}catch(e){}}}),i.push("lineheight_"+l)})),i}e.extend(!0,e.trumbowyg,{plugins:{lineheight:{init:function(t){t.o.plugins.lineheight=e.extend({},n,t.o.plugins.lineheight||{}),t.addBtnDef("lineheight",{dropdown:i(t)})}}}})}(jQuery);
|
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{mathml:"Insert Formulas",formulas:"Formulas",inline:"Inline"},da:{mathml:"Indsæt formler",formulas:"Formler",inline:"Inline"},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"},tr:{mathml:"Formül Ekle",formulas:"Formüller",inline:"Satır içi"},zh_tw:{mathml:"插入方程式",formulas:"方程式",inline:"內嵌"}},plugins:{mathml:{init:function(
|
1
|
+
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{mathml:"Insert Formulas",formulas:"Formulas",inline:"Inline"},da:{mathml:"Indsæt formler",formulas:"Formler",inline:"Inline"},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"},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={fn:function(){l.saveRange();var n={formulas:{label:l.lang.formulas,required:!0,value:""},inline:{label:l.lang.inline,attributes:{checked:!0},type:"checkbox",required:!1}},a=function(t){var r=t.inline?"$":"$$";if(l.currentMathNode)e(l.currentMathNode).html(r+" "+t.formulas+" "+r).attr("formulas",t.formulas).attr("inline",t.inline?"true":"false");else{var i='<span class="mathMlContainer" contenteditable="false" formulas="'+t.formulas+'" inline="'+(t.inline?"true":"false")+'" >'+r+" "+t.formulas+" "+r+"</span>",m=e(i)[0];m.onclick=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)},l.range.deleteContents(),l.range.insertNode(m)}return l.currentMathNode=!1,MathJax.Hub.Queue(["Typeset",MathJax.Hub]),!0};n.formulas.value=l.getRangeText(),n.inline.attributes.checked=!0,l.openModalInsert(l.lang.mathml,n,a)}};l.addBtnDef("mathml",n)}}}})}(jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* Trumbowyg v2.
|
2
|
+
* Trumbowyg v2.25.1 - A lightweight WYSIWYG editor
|
3
3
|
* Trumbowyg plugin stylesheet
|
4
4
|
* ------------------------
|
5
5
|
* @link http://alex-d.github.io/Trumbowyg
|
@@ -24,6 +24,7 @@
|
|
24
24
|
bottom: 0;
|
25
25
|
left: 0;
|
26
26
|
background-color: rgba(255, 255, 255, 0.83);
|
27
|
-
box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
|
27
|
+
-webkit-box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
|
28
|
+
box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83);
|
28
29
|
cursor: pointer;
|
29
30
|
pointer-events: auto; }
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/ui/trumbowyg.mathml.min.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
/** Trumbowyg v2.
|
2
|
-
.mathMlContainer{position:relative}.mathMlContainer[inline=false]{display:block;width:100%}.mathMlContainer:hover{pointer-events:none}.mathMlContainer:hover::after{content:'\270E';position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.83);box-shadow:0 0 5px 5px rgba(255,255,255,.83);cursor:pointer;pointer-events:auto}
|
1
|
+
/** Trumbowyg v2.25.1 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
|
2
|
+
.mathMlContainer{position:relative}.mathMlContainer[inline=false]{display:block;width:100%}.mathMlContainer:hover{pointer-events:none}.mathMlContainer:hover::after{content:'\270E';position:absolute;top:0;right:0;bottom:0;left: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}
|
@@ -1 +1 @@
|
|
1
|
-
!function(n){"use strict";
|
1
|
+
!function(n){"use strict";var t={source:[],formatDropdownItem:function(n){return n.login},formatResult:function(n){return"@"+n.login+" "}};function o(t,o){var e=[];return n.each(t,(function(n,t){var i="mention-"+n,r={hasIcon:!1,text:o.o.plugins.mention.formatDropdownItem(t),fn:function(){return o.execCmd("insertHTML",o.o.plugins.mention.formatResult(t)),!0}};o.addBtnDef(i,r),e.push(i)})),e}n.extend(!0,n.trumbowyg,{langs:{en:{mention:"Mention"},da:{mention:"Nævn"},et:{mention:"Maini"},fr:{mention:"Mentionner"},hu:{mention:"Említ"},ko:{mention:"언급"},pt_br:{mention:"Menção"},ru:{mention:"Упомянуть"},tr:{mention:"Bahset"},zh_tw:{mention:"標記"}},plugins:{mention:{init:function(e){e.o.plugins.mention=n.extend(!0,{},t,e.o.plugins.mention||{});var i={dropdown:o(e.o.plugins.mention.source,e)};e.addBtnDef("mention",i)}}}})}(jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* Trumbowyg v2.
|
2
|
+
* Trumbowyg v2.25.1 - A lightweight WYSIWYG editor
|
3
3
|
* Trumbowyg plugin stylesheet
|
4
4
|
* ------------------------
|
5
5
|
* @link http://alex-d.github.io/Trumbowyg
|
@@ -19,6 +19,10 @@
|
|
19
19
|
right: 0;
|
20
20
|
width: 15%;
|
21
21
|
height: 100%;
|
22
|
-
background-size: 100%;
|
22
|
+
-webkit-background-size: 100% 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: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, #ffffff 80%, #ffffff 100%);
|
26
|
+
background-image: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, #ffffff 80%, #ffffff 100%);
|
23
27
|
background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 80%, #ffffff 100%);
|
24
28
|
pointer-events: none; }
|
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%;background-size:100%;background-image:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 80%,#fff 100%);pointer-events:none}
|
1
|
+
/** Trumbowyg v2.25.1 - 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%;-webkit-background-size:100% 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:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,#fff 80%,#fff 100%);background-image:-o-linear-gradient(left,rgba(255,255,255,0) 0,#fff 80%,#fff 100%);background-image:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 80%,#fff 100%);pointer-events:none}
|
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";var r={proxy:"https://noembed.com/embed?nowrap=on",urlFiled:"url",data:[],success:void 0,error:void 0};e.extend(!0,e.trumbowyg,{langs:{en:{noembed:"Noembed",noembedError:"Error"},cs:{noembedError:"Chyba"},da:{noembedError:"Fejl"},fr:{noembedError:"Erreur"},hu:{noembed:"Noembed",noembedError:"Hiba"},ja:{noembedError:"エラー"},ko:{noembed:"oEmbed 넣기",noembedError:"에러"},pt_br:{noembed:"Incorporar",noembedError:"Erro"},ru:{noembedError:"Ошибка"},sk:{noembedError:"Chyba"},tr:{noembedError:"Hata"},zh_tw:{noembed:"插入影片",noembedError:"錯誤"}},plugins:{noembed:{init:function(o){o.o.plugins.noembed=e.extend(!0,{},r,o.o.plugins.noembed||{});var n={fn:function(){var r=o.openModalInsert(o.lang.noembed,{url:{label:"URL",required:!0}},function(n){e.ajax({url:o.o.plugins.noembed.proxy,type:"GET",data:n,cache:!1,dataType:"json",success:o.o.plugins.noembed.success||function(n){n.html?(o.execCmd("insertHTML",n.html),setTimeout(function(){o.closeModal()},250)):o.addErrorOnModalField(e("input[type=text]",r),n.error)},error:o.o.plugins.noembed.error||function(){o.addErrorOnModalField(e("input[type=text]",r),o.lang.noembedError)}})})}};o.addBtnDef("noembed",n)}}}})}(jQuery);
|
1
|
+
!function(e){"use strict";var r={proxy:"https://noembed.com/embed?nowrap=on",urlFiled:"url",data:[],success:void 0,error:void 0};e.extend(!0,e.trumbowyg,{langs:{en:{noembed:"Noembed",noembedError:"Error"},cs:{noembedError:"Chyba"},da:{noembedError:"Fejl"},et:{noembed:"Noembed",noembedError:"Viga"},fr:{noembedError:"Erreur"},hu:{noembed:"Noembed",noembedError:"Hiba"},ja:{noembedError:"エラー"},ko:{noembed:"oEmbed 넣기",noembedError:"에러"},pt_br:{noembed:"Incorporar",noembedError:"Erro"},ru:{noembedError:"Ошибка"},sk:{noembedError:"Chyba"},tr:{noembedError:"Hata"},zh_tw:{noembed:"插入影片",noembedError:"錯誤"}},plugins:{noembed:{init:function(o){o.o.plugins.noembed=e.extend(!0,{},r,o.o.plugins.noembed||{});var n={fn:function(){var r=o.openModalInsert(o.lang.noembed,{url:{label:"URL",required:!0}},(function(n){e.ajax({url:o.o.plugins.noembed.proxy,type:"GET",data:n,cache:!1,dataType:"json",success:o.o.plugins.noembed.success||function(n){n.html?(o.execCmd("insertHTML",n.html),setTimeout((function(){o.closeModal()}),250)):o.addErrorOnModalField(e("input[type=text]",r),n.error)},error:o.o.plugins.noembed.error||function(){o.addErrorOnModalField(e("input[type=text]",r),o.lang.noembedError)}})}))}};o.addBtnDef("noembed",n)}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteembed/trumbowyg.pasteembed.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(t){"use strict";var e={enabled:!0,endpoints:["https://noembed.com/embed?nowrap=on","https://api.maxmade.nl/url2iframe/embed"]};t.extend(!0,t.trumbowyg,{plugins:{pasteEmbed:{init:function(n){n.o.plugins.pasteEmbed=t.extend(!0,{},e,n.o.plugins.pasteEmbed||{}),n.o.plugins.pasteEmbed.enabled&&n.pasteHandlers.push(function(e){try{var a=(e.originalEvent||e).clipboardData
|
1
|
+
!function(t){"use strict";var e={enabled:!0,endpoints:["https://noembed.com/embed?nowrap=on","https://api.maxmade.nl/url2iframe/embed"]};t.extend(!0,t.trumbowyg,{plugins:{pasteEmbed:{init:function(n){n.o.plugins.pasteEmbed=t.extend(!0,{},e,n.o.plugins.pasteEmbed||{}),n.o.plugins.pasteEmbed.enabled&&n.pasteHandlers.push((function(e){try{var a=(e.originalEvent||e).clipboardData.getData("Text"),r=n.o.plugins.pasteEmbed.endpoints,s=null;if(a.startsWith("http")){e.stopPropagation(),e.preventDefault();var i={url:a.trim()},o="",p=0;s&&s.transport&&s.transport.abort(),s=t.ajax({crossOrigin:!0,url:r[p],type:"GET",data:i,cache:!1,dataType:"jsonp",success:function(t){t.html?(p=0,o=t.html):p+=1},error:function(){p+=1},complete:function(){0===o.length&&p<r.length-1&&(this.url=r[p],this.data=i,t.ajax(this)),p===r.length-1&&(o=t("<a>",{href:a,text:a}).prop("outerHTML")),o.length>0&&(p=0,n.execCmd("insertHTML",o))}})}}catch(t){}}))}}}})}(jQuery);
|
data/app/assets/javascripts/activeadmin/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e){"use strict";e.extend(!0,e.trumbowyg,{plugins:{pasteImage:{init:function(e){e.pasteHandlers.push(function(t){try{for(var a,n=(t.originalEvent||t).clipboardData.items,i=!1,r=n.length-1;r>=0;r-=1)n[r].type.match(/^image\//)&&(a=new FileReader
|
1
|
+
!function(e){"use strict";e.extend(!0,e.trumbowyg,{plugins:{pasteImage:{init:function(e){e.pasteHandlers.push((function(t){try{for(var a,n=(t.originalEvent||t).clipboardData.items,i=!1,r=n.length-1;r>=0;r-=1)n[r].type.match(/^image\//)&&((a=new FileReader).onloadend=function(t){e.execCmd("insertImage",t.target.result,!1,!0)},a.readAsDataURL(n[r].getAsFile()),i=!0);i&&(t.stopPropagation(),t.preventDefault())}catch(e){}}))}}}})}(jQuery);
|