biso24-editor 1.3.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.
Files changed (104) hide show
  1. package/CKEditor4/.eslintrc.json +4 -0
  2. package/CKEditor4/CHANGES.md +2182 -0
  3. package/CKEditor4/LICENSE.md +1436 -0
  4. package/CKEditor4/README.md +39 -0
  5. package/CKEditor4/SECURITY.md +10 -0
  6. package/CKEditor4/adapters/jquery.js +158 -0
  7. package/CKEditor4/bender-runner.config.json +16 -0
  8. package/CKEditor4/build-config.js +100 -0
  9. package/CKEditor4/ckeditor.js +30065 -0
  10. package/CKEditor4/config.js +39 -0
  11. package/CKEditor4/contents.css +161 -0
  12. package/CKEditor4/lang/vi.js +475 -0
  13. package/CKEditor4/plugins/a11yhelp/dialogs/a11yhelp.js +143 -0
  14. package/CKEditor4/plugins/a11yhelp/dialogs/lang/vi.js +122 -0
  15. package/CKEditor4/plugins/ajax/plugin.js +241 -0
  16. package/CKEditor4/plugins/autocomplete/plugin.js +1655 -0
  17. package/CKEditor4/plugins/autocomplete/skins/default.css +38 -0
  18. package/CKEditor4/plugins/custompaste/plugin.js +57 -0
  19. package/CKEditor4/plugins/dialog/dialogDefinition.js +4 -0
  20. package/CKEditor4/plugins/dialog/styles/dialog.css +18 -0
  21. package/CKEditor4/plugins/font/lang/vi.js +14 -0
  22. package/CKEditor4/plugins/font/plugin.js +535 -0
  23. package/CKEditor4/plugins/icons.png +0 -0
  24. package/CKEditor4/plugins/icons_hidpi.png +0 -0
  25. package/CKEditor4/plugins/image2/dialogs/image2.js +558 -0
  26. package/CKEditor4/plugins/image2/icons/hidpi/image.png +0 -0
  27. package/CKEditor4/plugins/image2/icons/image.png +0 -0
  28. package/CKEditor4/plugins/image2/lang/vi.js +21 -0
  29. package/CKEditor4/plugins/image2/plugin.js +1708 -0
  30. package/CKEditor4/plugins/justify/icons/hidpi/justifyblock.png +0 -0
  31. package/CKEditor4/plugins/justify/icons/hidpi/justifycenter.png +0 -0
  32. package/CKEditor4/plugins/justify/icons/hidpi/justifyleft.png +0 -0
  33. package/CKEditor4/plugins/justify/icons/hidpi/justifyright.png +0 -0
  34. package/CKEditor4/plugins/justify/icons/justifyblock.png +0 -0
  35. package/CKEditor4/plugins/justify/icons/justifycenter.png +0 -0
  36. package/CKEditor4/plugins/justify/icons/justifyleft.png +0 -0
  37. package/CKEditor4/plugins/justify/icons/justifyright.png +0 -0
  38. package/CKEditor4/plugins/justify/plugin.js +266 -0
  39. package/CKEditor4/plugins/justify_group/icons/hidpi/justifycenter.png +0 -0
  40. package/CKEditor4/plugins/justify_group/icons/justifycenter.png +0 -0
  41. package/CKEditor4/plugins/justify_group/plugin.js +64 -0
  42. package/CKEditor4/plugins/lineheight/LICENSE +22 -0
  43. package/CKEditor4/plugins/lineheight/README.md +2 -0
  44. package/CKEditor4/plugins/lineheight/lang/vi.js +3 -0
  45. package/CKEditor4/plugins/lineheight/plugin.js +99 -0
  46. package/CKEditor4/plugins/lineheight/readme.txt +30 -0
  47. package/CKEditor4/plugins/link/dialogs/anchor.js +82 -0
  48. package/CKEditor4/plugins/link/dialogs/link.js +777 -0
  49. package/CKEditor4/plugins/link/images/anchor.png +0 -0
  50. package/CKEditor4/plugins/link/images/hidpi/anchor.png +0 -0
  51. package/CKEditor4/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  52. package/CKEditor4/plugins/magicline/images/hidpi/icon.png +0 -0
  53. package/CKEditor4/plugins/magicline/images/icon-rtl.png +0 -0
  54. package/CKEditor4/plugins/magicline/images/icon.png +0 -0
  55. package/CKEditor4/plugins/mentions/plugin.js +471 -0
  56. package/CKEditor4/plugins/menubutton/plugin.js +99 -0
  57. package/CKEditor4/plugins/pastefromword/filter/default.js +849 -0
  58. package/CKEditor4/plugins/pastetools/filter/common.js +445 -0
  59. package/CKEditor4/plugins/pastetools/filter/image.js +163 -0
  60. package/CKEditor4/plugins/pdffile/icons/exporttopdf.png +0 -0
  61. package/CKEditor4/plugins/pdffile/icons/hidpi/exporttopdf.png +0 -0
  62. package/CKEditor4/plugins/pdffile/plugin.js +36 -0
  63. package/CKEditor4/plugins/placeholder_button/plugin.js +31 -0
  64. package/CKEditor4/plugins/sourcedialog/dialogs/sourcedialog.js +88 -0
  65. package/CKEditor4/plugins/sourcedialog/icons/hidpi/sourcedialog-rtl.png +0 -0
  66. package/CKEditor4/plugins/sourcedialog/icons/hidpi/sourcedialog.png +0 -0
  67. package/CKEditor4/plugins/sourcedialog/icons/sourcedialog-rtl.png +0 -0
  68. package/CKEditor4/plugins/sourcedialog/icons/sourcedialog.png +0 -0
  69. package/CKEditor4/plugins/sourcedialog/lang/vi.js +9 -0
  70. package/CKEditor4/plugins/sourcedialog/plugin.js +30 -0
  71. package/CKEditor4/plugins/textmatch/plugin.js +331 -0
  72. package/CKEditor4/plugins/textwatcher/plugin.js +295 -0
  73. package/CKEditor4/plugins/widget/images/handle.png +0 -0
  74. package/CKEditor4/plugins/wordfile/icons/exporttoword.png +0 -0
  75. package/CKEditor4/plugins/wordfile/icons/hidpi/exporttoword.png +0 -0
  76. package/CKEditor4/plugins/wordfile/icons/hidpi/importfromword.png +0 -0
  77. package/CKEditor4/plugins/wordfile/icons/importfromword.png +0 -0
  78. package/CKEditor4/plugins/wordfile/plugin.js +161 -0
  79. package/CKEditor4/skins/moono-lisa/dialog.css +685 -0
  80. package/CKEditor4/skins/moono-lisa/dialog_ie.css +721 -0
  81. package/CKEditor4/skins/moono-lisa/dialog_ie8.css +746 -0
  82. package/CKEditor4/skins/moono-lisa/dialog_iequirks.css +724 -0
  83. package/CKEditor4/skins/moono-lisa/editor.css +1551 -0
  84. package/CKEditor4/skins/moono-lisa/editor_gecko.css +1556 -0
  85. package/CKEditor4/skins/moono-lisa/editor_ie.css +1588 -0
  86. package/CKEditor4/skins/moono-lisa/editor_ie8.css +1639 -0
  87. package/CKEditor4/skins/moono-lisa/editor_iequirks.css +1632 -0
  88. package/CKEditor4/skins/moono-lisa/icons.png +0 -0
  89. package/CKEditor4/skins/moono-lisa/icons_hidpi.png +0 -0
  90. package/CKEditor4/skins/moono-lisa/images/arrow.png +0 -0
  91. package/CKEditor4/skins/moono-lisa/images/close.png +0 -0
  92. package/CKEditor4/skins/moono-lisa/images/hidpi/close.png +0 -0
  93. package/CKEditor4/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  94. package/CKEditor4/skins/moono-lisa/images/hidpi/lock.png +0 -0
  95. package/CKEditor4/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  96. package/CKEditor4/skins/moono-lisa/images/lock-open.png +0 -0
  97. package/CKEditor4/skins/moono-lisa/images/lock.png +0 -0
  98. package/CKEditor4/skins/moono-lisa/images/refresh.png +0 -0
  99. package/CKEditor4/skins/moono-lisa/images/spinner.gif +0 -0
  100. package/CKEditor4/skins/moono-lisa/readme.md +46 -0
  101. package/CKEditor4/styles.js +136 -0
  102. package/CKEditor4/vendor/promise.js +385 -0
  103. package/README.md +3 -0
  104. package/package.json +9 -0
@@ -0,0 +1,777 @@
1
+ /*
2
+ Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ (function () {
6
+ function u() {
7
+ var c = this.getDialog(),
8
+ p = c._.editor,
9
+ n = p.config.linkPhoneRegExp,
10
+ q = p.config.linkPhoneMsg,
11
+ p = CKEDITOR.dialog.validate.notEmpty(p.lang.link.noTel).apply(this);
12
+ if (!c.getContentElement('info', 'linkType') || 'tel' != c.getValueOf('info', 'linkType')) return !0;
13
+ if (!0 !== p) return p;
14
+ if (n) return CKEDITOR.dialog.validate.regex(n, q).call(this);
15
+ }
16
+ CKEDITOR.dialog.add('link', function (c) {
17
+ function p(a, b) {
18
+ var c = a.createRange();
19
+ c.setStartBefore(b);
20
+ c.setEndAfter(b);
21
+ return c;
22
+ }
23
+ var n = CKEDITOR.plugins.link,
24
+ q,
25
+ t = function () {
26
+ var a = this.getDialog(),
27
+ b = a.getContentElement('target', 'popupFeatures'),
28
+ a = a.getContentElement('target', 'linkTargetName'),
29
+ r = this.getValue();
30
+ if (b && a)
31
+ switch (((b = b.getElement()), b.hide(), a.setValue(''), r)) {
32
+ case 'frame':
33
+ a.setLabel(c.lang.link.targetFrameName);
34
+ a.getElement().show();
35
+ break;
36
+ case 'popup':
37
+ b.show();
38
+ a.setLabel(c.lang.link.targetPopupName);
39
+ a.getElement().show();
40
+ break;
41
+ default:
42
+ a.setValue(r), a.getElement().hide();
43
+ }
44
+ },
45
+ d = function (a) {
46
+ a.target && this.setValue(a.target[this.id] || '');
47
+ },
48
+ g = function (a) {
49
+ a.advanced && this.setValue(a.advanced[this.id] || '');
50
+ },
51
+ e = function (a) {
52
+ a.target || (a.target = {});
53
+ a.target[this.id] = this.getValue() || '';
54
+ },
55
+ k = function (a) {
56
+ a.advanced || (a.advanced = {});
57
+ a.advanced[this.id] = this.getValue() || '';
58
+ },
59
+ h = c.lang.common,
60
+ b = c.lang.link,
61
+ l;
62
+ return {
63
+ title: b.title,
64
+ minWidth: 'moono-lisa' == (CKEDITOR.skinName || c.config.skin) ? 450 : 350,
65
+ minHeight: 240,
66
+ getModel: function (a) {
67
+ return n.getSelectedLink(a, !0)[0] || null;
68
+ },
69
+ contents: [
70
+ {
71
+ id: 'info',
72
+ label: b.info,
73
+ title: b.info,
74
+ elements: [
75
+ {
76
+ type: 'text',
77
+ id: 'linkDisplayText',
78
+ label: b.displayText,
79
+ setup: function () {
80
+ this.enable();
81
+ this.setValue(c.getSelection().getSelectedText());
82
+ q = this.getValue();
83
+ },
84
+ commit: function (a) {
85
+ a.linkText = this.isEnabled() ? this.getValue() : '';
86
+ },
87
+ },
88
+ {
89
+ id: 'linkType',
90
+ type: 'select',
91
+ label: b.type,
92
+ default: 'url',
93
+ items: [
94
+ [b.toUrl, 'url'],
95
+ [b.toAnchor, 'anchor'],
96
+ [b.toEmail, 'email'],
97
+ [b.toPhone, 'tel'],
98
+ ],
99
+ onChange: function () {
100
+ var a = this.getDialog(),
101
+ b = ['urlOptions', 'anchorOptions', 'emailOptions', 'telOptions'],
102
+ r = this.getValue(),
103
+ f = a.definition.getContents('upload'),
104
+ f = f && f.hidden;
105
+ 'url' == r
106
+ ? (c.config.linkShowTargetTab && a.showPage('target'), f || a.showPage('upload'))
107
+ : (a.hidePage('target'), f || a.hidePage('upload'));
108
+ for (f = 0; f < b.length; f++) {
109
+ var m = a.getContentElement('info', b[f]);
110
+ m && ((m = m.getElement().getParent().getParent()), b[f] == r + 'Options' ? m.show() : m.hide());
111
+ }
112
+ a.layout();
113
+ },
114
+ setup: function (a) {
115
+ this.setValue(a.type || 'url');
116
+ },
117
+ commit: function (a) {
118
+ a.type = this.getValue();
119
+ },
120
+ },
121
+ {
122
+ type: 'vbox',
123
+ id: 'urlOptions',
124
+ children: [
125
+ {
126
+ type: 'hbox',
127
+ widths: ['25%', '75%'],
128
+ children: [
129
+ {
130
+ id: 'protocol',
131
+ type: 'select',
132
+ label: h.protocol,
133
+ items: [
134
+ ['http://‎', 'http://'],
135
+ ['https://‎', 'https://'],
136
+ ['ftp://‎', 'ftp://'],
137
+ ['news://‎', 'news://'],
138
+ [b.other, ''],
139
+ ],
140
+ default: c.config.linkDefaultProtocol,
141
+ setup: function (a) {
142
+ a.url && this.setValue(a.url.protocol || '');
143
+ },
144
+ commit: function (a) {
145
+ a.url || (a.url = {});
146
+ a.url.protocol = this.getValue();
147
+ },
148
+ },
149
+ {
150
+ type: 'text',
151
+ id: 'url',
152
+ label: h.url,
153
+ required: !0,
154
+ onLoad: function () {
155
+ this.allowOnChange = !0;
156
+ },
157
+ onKeyUp: function () {
158
+ this.allowOnChange = !1;
159
+ var a = this.getDialog().getContentElement('info', 'protocol'),
160
+ b = this.getValue(),
161
+ c = /^((javascript:)|[#\/\.\?])/i,
162
+ f = /^(http|https|ftp|news):\/\/(?=.)/i.exec(b);
163
+ f
164
+ ? (this.setValue(b.substr(f[0].length)), a.setValue(f[0].toLowerCase()))
165
+ : c.test(b) && a.setValue('');
166
+ this.allowOnChange = !0;
167
+ },
168
+ onChange: function () {
169
+ if (this.allowOnChange) this.onKeyUp();
170
+ },
171
+ validate: function () {
172
+ var a = this.getDialog();
173
+ return a.getContentElement('info', 'linkType') && 'url' != a.getValueOf('info', 'linkType')
174
+ ? !0
175
+ : !c.config.linkJavaScriptLinksAllowed && /javascript\:/.test(this.getValue())
176
+ ? (alert(h.invalidValue), !1)
177
+ : this.getDialog().fakeObj
178
+ ? !0
179
+ : CKEDITOR.dialog.validate.notEmpty(b.noUrl).apply(this);
180
+ },
181
+ setup: function (a) {
182
+ this.allowOnChange = !1;
183
+ a.url && this.setValue(a.url.url);
184
+ this.allowOnChange = !0;
185
+ },
186
+ commit: function (a) {
187
+ this.onChange();
188
+ a.url || (a.url = {});
189
+ a.url.url = this.getValue();
190
+ this.allowOnChange = !1;
191
+ },
192
+ },
193
+ ],
194
+ setup: function () {
195
+ this.getDialog().getContentElement('info', 'linkType') || this.getElement().show();
196
+ },
197
+ },
198
+ { type: 'button', id: 'browse', hidden: 'true', filebrowser: 'info:url', label: h.browseServer },
199
+ ],
200
+ },
201
+ {
202
+ type: 'vbox',
203
+ id: 'anchorOptions',
204
+ width: 260,
205
+ align: 'center',
206
+ padding: 0,
207
+ children: [
208
+ {
209
+ type: 'fieldset',
210
+ id: 'selectAnchorText',
211
+ label: b.selectAnchor,
212
+ setup: function () {
213
+ l = n.getEditorAnchors(c);
214
+ this.getElement()[l && l.length ? 'show' : 'hide']();
215
+ },
216
+ children: [
217
+ {
218
+ type: 'hbox',
219
+ id: 'selectAnchor',
220
+ children: [
221
+ {
222
+ type: 'select',
223
+ id: 'anchorName',
224
+ default: '',
225
+ label: b.anchorName,
226
+ style: 'width: 100%;',
227
+ items: [['']],
228
+ setup: function (a) {
229
+ this.clear();
230
+ this.add('');
231
+ if (l) for (var b = 0; b < l.length; b++) l[b].name && this.add(l[b].name);
232
+ a.anchor && this.setValue(a.anchor.name);
233
+ (a = this.getDialog().getContentElement('info', 'linkType')) &&
234
+ 'email' == a.getValue() &&
235
+ this.focus();
236
+ },
237
+ commit: function (a) {
238
+ a.anchor || (a.anchor = {});
239
+ a.anchor.name = this.getValue();
240
+ },
241
+ },
242
+ {
243
+ type: 'select',
244
+ id: 'anchorId',
245
+ default: '',
246
+ label: b.anchorId,
247
+ style: 'width: 100%;',
248
+ items: [['']],
249
+ setup: function (a) {
250
+ this.clear();
251
+ this.add('');
252
+ if (l) for (var b = 0; b < l.length; b++) l[b].id && this.add(l[b].id);
253
+ a.anchor && this.setValue(a.anchor.id);
254
+ },
255
+ commit: function (a) {
256
+ a.anchor || (a.anchor = {});
257
+ a.anchor.id = this.getValue();
258
+ },
259
+ },
260
+ ],
261
+ setup: function () {
262
+ this.getElement()[l && l.length ? 'show' : 'hide']();
263
+ },
264
+ },
265
+ ],
266
+ },
267
+ {
268
+ type: 'html',
269
+ id: 'noAnchors',
270
+ style: 'text-align: center;',
271
+ html:
272
+ '\x3cdiv role\x3d"note" tabIndex\x3d"-1"\x3e' +
273
+ CKEDITOR.tools.htmlEncode(b.noAnchors) +
274
+ '\x3c/div\x3e',
275
+ focus: !0,
276
+ setup: function () {
277
+ this.getElement()[l && l.length ? 'hide' : 'show']();
278
+ },
279
+ },
280
+ ],
281
+ setup: function () {
282
+ this.getDialog().getContentElement('info', 'linkType') || this.getElement().hide();
283
+ },
284
+ },
285
+ {
286
+ type: 'vbox',
287
+ id: 'emailOptions',
288
+ padding: 1,
289
+ children: [
290
+ {
291
+ type: 'text',
292
+ id: 'emailAddress',
293
+ label: b.emailAddress,
294
+ required: !0,
295
+ validate: function () {
296
+ var a = this.getDialog();
297
+ return a.getContentElement('info', 'linkType') && 'email' == a.getValueOf('info', 'linkType')
298
+ ? CKEDITOR.dialog.validate.notEmpty(b.noEmail).apply(this)
299
+ : !0;
300
+ },
301
+ setup: function (a) {
302
+ a.email && this.setValue(a.email.address);
303
+ (a = this.getDialog().getContentElement('info', 'linkType')) &&
304
+ 'email' == a.getValue() &&
305
+ this.select();
306
+ },
307
+ commit: function (a) {
308
+ a.email || (a.email = {});
309
+ a.email.address = this.getValue();
310
+ },
311
+ },
312
+ {
313
+ type: 'text',
314
+ id: 'emailSubject',
315
+ label: b.emailSubject,
316
+ setup: function (a) {
317
+ a.email && this.setValue(a.email.subject);
318
+ },
319
+ commit: function (a) {
320
+ a.email || (a.email = {});
321
+ a.email.subject = this.getValue();
322
+ },
323
+ },
324
+ {
325
+ type: 'textarea',
326
+ id: 'emailBody',
327
+ label: b.emailBody,
328
+ rows: 3,
329
+ default: '',
330
+ setup: function (a) {
331
+ a.email && this.setValue(a.email.body);
332
+ },
333
+ commit: function (a) {
334
+ a.email || (a.email = {});
335
+ a.email.body = this.getValue();
336
+ },
337
+ },
338
+ ],
339
+ setup: function () {
340
+ this.getDialog().getContentElement('info', 'linkType') || this.getElement().hide();
341
+ },
342
+ },
343
+ {
344
+ type: 'vbox',
345
+ id: 'telOptions',
346
+ padding: 1,
347
+ children: [
348
+ {
349
+ type: 'tel',
350
+ id: 'telNumber',
351
+ label: b.phoneNumber,
352
+ required: !0,
353
+ validate: u,
354
+ setup: function (a) {
355
+ a.tel && this.setValue(a.tel);
356
+ (a = this.getDialog().getContentElement('info', 'linkType')) &&
357
+ 'tel' == a.getValue() &&
358
+ this.select();
359
+ },
360
+ commit: function (a) {
361
+ a.tel = this.getValue();
362
+ },
363
+ },
364
+ ],
365
+ setup: function () {
366
+ this.getDialog().getContentElement('info', 'linkType') || this.getElement().hide();
367
+ },
368
+ },
369
+ ],
370
+ },
371
+ {
372
+ id: 'target',
373
+ requiredContent: 'a[target]',
374
+ label: b.target,
375
+ title: b.target,
376
+ elements: [
377
+ {
378
+ type: 'hbox',
379
+ widths: ['50%', '50%'],
380
+ children: [
381
+ {
382
+ type: 'select',
383
+ id: 'linkTargetType',
384
+ label: h.target,
385
+ default: 'notSet',
386
+ style: 'width : 100%;',
387
+ items: [
388
+ [h.notSet, 'notSet'],
389
+ [b.targetFrame, 'frame'],
390
+ [b.targetPopup, 'popup'],
391
+ [h.targetNew, '_blank'],
392
+ [h.targetTop, '_top'],
393
+ [h.targetSelf, '_self'],
394
+ [h.targetParent, '_parent'],
395
+ ],
396
+ onChange: t,
397
+ setup: function (a) {
398
+ a.target && this.setValue(a.target.type || 'notSet');
399
+ t.call(this);
400
+ },
401
+ commit: function (a) {
402
+ a.target || (a.target = {});
403
+ a.target.type = this.getValue();
404
+ },
405
+ },
406
+ {
407
+ type: 'text',
408
+ id: 'linkTargetName',
409
+ label: b.targetFrameName,
410
+ default: '',
411
+ setup: function (a) {
412
+ a.target && this.setValue(a.target.name);
413
+ },
414
+ commit: function (a) {
415
+ a.target || (a.target = {});
416
+ a.target.name = this.getValue().replace(/([^\x00-\x7F]|\s)/gi, '');
417
+ },
418
+ },
419
+ ],
420
+ },
421
+ {
422
+ type: 'vbox',
423
+ width: '100%',
424
+ align: 'center',
425
+ padding: 2,
426
+ id: 'popupFeatures',
427
+ children: [
428
+ {
429
+ type: 'fieldset',
430
+ label: b.popupFeatures,
431
+ children: [
432
+ {
433
+ type: 'hbox',
434
+ children: [
435
+ { type: 'checkbox', id: 'resizable', label: b.popupResizable, setup: d, commit: e },
436
+ { type: 'checkbox', id: 'status', label: b.popupStatusBar, setup: d, commit: e },
437
+ ],
438
+ },
439
+ {
440
+ type: 'hbox',
441
+ children: [
442
+ { type: 'checkbox', id: 'location', label: b.popupLocationBar, setup: d, commit: e },
443
+ { type: 'checkbox', id: 'toolbar', label: b.popupToolbar, setup: d, commit: e },
444
+ ],
445
+ },
446
+ {
447
+ type: 'hbox',
448
+ children: [
449
+ { type: 'checkbox', id: 'menubar', label: b.popupMenuBar, setup: d, commit: e },
450
+ { type: 'checkbox', id: 'fullscreen', label: b.popupFullScreen, setup: d, commit: e },
451
+ ],
452
+ },
453
+ {
454
+ type: 'hbox',
455
+ children: [
456
+ { type: 'checkbox', id: 'scrollbars', label: b.popupScrollBars, setup: d, commit: e },
457
+ { type: 'checkbox', id: 'dependent', label: b.popupDependent, setup: d, commit: e },
458
+ ],
459
+ },
460
+ {
461
+ type: 'hbox',
462
+ children: [
463
+ {
464
+ type: 'text',
465
+ widths: ['50%', '50%'],
466
+ labelLayout: 'horizontal',
467
+ label: h.width,
468
+ id: 'width',
469
+ setup: d,
470
+ commit: e,
471
+ },
472
+ {
473
+ type: 'text',
474
+ labelLayout: 'horizontal',
475
+ widths: ['50%', '50%'],
476
+ label: b.popupLeft,
477
+ id: 'left',
478
+ setup: d,
479
+ commit: e,
480
+ },
481
+ ],
482
+ },
483
+ {
484
+ type: 'hbox',
485
+ children: [
486
+ {
487
+ type: 'text',
488
+ labelLayout: 'horizontal',
489
+ widths: ['50%', '50%'],
490
+ label: h.height,
491
+ id: 'height',
492
+ setup: d,
493
+ commit: e,
494
+ },
495
+ {
496
+ type: 'text',
497
+ labelLayout: 'horizontal',
498
+ label: b.popupTop,
499
+ widths: ['50%', '50%'],
500
+ id: 'top',
501
+ setup: d,
502
+ commit: e,
503
+ },
504
+ ],
505
+ },
506
+ ],
507
+ },
508
+ ],
509
+ },
510
+ ],
511
+ },
512
+ {
513
+ id: 'upload',
514
+ label: b.upload,
515
+ title: b.upload,
516
+ hidden: !0,
517
+ filebrowser: 'uploadButton',
518
+ elements: [
519
+ { type: 'file', id: 'upload', label: h.upload, style: 'height:40px', size: 29 },
520
+ {
521
+ type: 'fileButton',
522
+ id: 'uploadButton',
523
+ label: h.uploadSubmit,
524
+ filebrowser: 'info:url',
525
+ for: ['upload', 'upload'],
526
+ },
527
+ ],
528
+ },
529
+ {
530
+ id: 'advanced',
531
+ label: b.advanced,
532
+ title: b.advanced,
533
+ elements: [
534
+ {
535
+ type: 'vbox',
536
+ padding: 1,
537
+ children: [
538
+ {
539
+ type: 'hbox',
540
+ widths: ['45%', '35%', '20%'],
541
+ children: [
542
+ { type: 'text', id: 'advId', requiredContent: 'a[id]', label: b.id, setup: g, commit: k },
543
+ {
544
+ type: 'select',
545
+ id: 'advLangDir',
546
+ requiredContent: 'a[dir]',
547
+ label: b.langDir,
548
+ default: '',
549
+ style: 'width:110px',
550
+ items: [
551
+ [h.notSet, ''],
552
+ [b.langDirLTR, 'ltr'],
553
+ [b.langDirRTL, 'rtl'],
554
+ ],
555
+ setup: g,
556
+ commit: k,
557
+ },
558
+ {
559
+ type: 'text',
560
+ id: 'advAccessKey',
561
+ requiredContent: 'a[accesskey]',
562
+ width: '80px',
563
+ label: b.acccessKey,
564
+ maxLength: 1,
565
+ setup: g,
566
+ commit: k,
567
+ },
568
+ ],
569
+ },
570
+ {
571
+ type: 'hbox',
572
+ widths: ['45%', '35%', '20%'],
573
+ children: [
574
+ { type: 'text', label: b.name, id: 'advName', requiredContent: 'a[name]', setup: g, commit: k },
575
+ {
576
+ type: 'text',
577
+ label: b.langCode,
578
+ id: 'advLangCode',
579
+ requiredContent: 'a[lang]',
580
+ width: '110px',
581
+ default: '',
582
+ setup: g,
583
+ commit: k,
584
+ },
585
+ {
586
+ type: 'text',
587
+ label: b.tabIndex,
588
+ id: 'advTabIndex',
589
+ requiredContent: 'a[tabindex]',
590
+ width: '80px',
591
+ maxLength: 5,
592
+ setup: g,
593
+ commit: k,
594
+ },
595
+ ],
596
+ },
597
+ ],
598
+ },
599
+ {
600
+ type: 'vbox',
601
+ padding: 1,
602
+ children: [
603
+ {
604
+ type: 'hbox',
605
+ widths: ['45%', '55%'],
606
+ children: [
607
+ {
608
+ type: 'text',
609
+ label: b.advisoryTitle,
610
+ requiredContent: 'a[title]',
611
+ default: '',
612
+ id: 'advTitle',
613
+ setup: g,
614
+ commit: k,
615
+ },
616
+ {
617
+ type: 'text',
618
+ label: b.advisoryContentType,
619
+ requiredContent: 'a[type]',
620
+ default: '',
621
+ id: 'advContentType',
622
+ setup: g,
623
+ commit: k,
624
+ },
625
+ ],
626
+ },
627
+ {
628
+ type: 'hbox',
629
+ widths: ['45%', '55%'],
630
+ children: [
631
+ {
632
+ type: 'text',
633
+ label: b.cssClasses,
634
+ requiredContent: 'a(cke-xyz)',
635
+ default: '',
636
+ id: 'advCSSClasses',
637
+ setup: g,
638
+ commit: k,
639
+ },
640
+ {
641
+ type: 'text',
642
+ label: b.charset,
643
+ requiredContent: 'a[charset]',
644
+ default: '',
645
+ id: 'advCharset',
646
+ setup: g,
647
+ commit: k,
648
+ },
649
+ ],
650
+ },
651
+ {
652
+ type: 'hbox',
653
+ widths: ['45%', '55%'],
654
+ children: [
655
+ {
656
+ type: 'text',
657
+ label: b.rel,
658
+ requiredContent: 'a[rel]',
659
+ default: '',
660
+ id: 'advRel',
661
+ setup: g,
662
+ commit: k,
663
+ },
664
+ {
665
+ type: 'text',
666
+ label: b.styles,
667
+ requiredContent: 'a{cke-xyz}',
668
+ default: '',
669
+ id: 'advStyles',
670
+ validate: CKEDITOR.dialog.validate.inlineStyle(c.lang.common.invalidInlineStyle),
671
+ setup: g,
672
+ commit: k,
673
+ },
674
+ ],
675
+ },
676
+ {
677
+ type: 'hbox',
678
+ widths: ['45%', '55%'],
679
+ children: [
680
+ {
681
+ type: 'checkbox',
682
+ id: 'download',
683
+ requiredContent: 'a[download]',
684
+ label: b.download,
685
+ setup: function (a) {
686
+ void 0 !== a.download && this.setValue('checked', 'checked');
687
+ },
688
+ commit: function (a) {
689
+ this.getValue() && (a.download = this.getValue());
690
+ },
691
+ },
692
+ ],
693
+ },
694
+ ],
695
+ },
696
+ ],
697
+ },
698
+ ],
699
+ onShow: function () {
700
+ var a = this.getParentEditor(),
701
+ b = a.getSelection(),
702
+ c = this.getContentElement('info', 'linkDisplayText').getElement().getParent().getParent(),
703
+ f = n.getSelectedLink(a, !0),
704
+ m = f[0] || null;
705
+ m && m.hasAttribute('href') && (b.getSelectedElement() || b.isInTable() || b.selectElement(m));
706
+ b = n.parseLinkAttributes(a, m);
707
+ 1 >= f.length && n.showDisplayTextForElement(m, a) ? c.show() : c.hide();
708
+ this._.selectedElements = f;
709
+ this.setupContent(b);
710
+ },
711
+ onOk: function () {
712
+ var a = {};
713
+ this.commitContent(a);
714
+ if (this._.selectedElements.length) {
715
+ var b = this._.selectedElements,
716
+ h = n.getLinkAttributes(c, a),
717
+ f = [],
718
+ m,
719
+ l,
720
+ d,
721
+ g,
722
+ e,
723
+ k;
724
+ for (k = 0; k < b.length; k++) {
725
+ g = b[k];
726
+ l = g.data('cke-saved-href');
727
+ m = a.linkText && q != a.linkText;
728
+ d = l == q;
729
+ l = 'email' == a.type && l == 'mailto:' + q;
730
+ g.setAttributes(h.set);
731
+ g.removeAttributes(h.removed);
732
+ if (m) e = a.linkText;
733
+ else if (d || l) e = 'email' == a.type ? a.email.address : h.set['data-cke-saved-href'];
734
+ e && g.setText(e);
735
+ f.push(p(c, g));
736
+ }
737
+ c.getSelection().selectRanges(f);
738
+ delete this._.selectedElements;
739
+ } else {
740
+ b = n.getLinkAttributes(c, a);
741
+ h = c.getSelection().getRanges();
742
+ f = new CKEDITOR.style({ element: 'a', attributes: b.set });
743
+ m = [];
744
+ f.type = CKEDITOR.STYLE_INLINE;
745
+ for (g = 0; g < h.length; g++) {
746
+ d = h[g];
747
+ d.collapsed
748
+ ? ((e = new CKEDITOR.dom.text(
749
+ a.linkText || ('email' == a.type ? a.email.address : b.set['data-cke-saved-href']),
750
+ c.document,
751
+ )),
752
+ d.insertNode(e),
753
+ d.selectNodeContents(e))
754
+ : q !== a.linkText &&
755
+ ((e = new CKEDITOR.dom.text(a.linkText, c.document)),
756
+ d.shrink(CKEDITOR.SHRINK_TEXT),
757
+ c.editable().extractHtmlFromRange(d),
758
+ d.insertNode(e));
759
+ e = d._find('a');
760
+ for (k = 0; k < e.length; k++) e[k].remove(!0);
761
+ f.applyToRange(d, c);
762
+ m.push(d);
763
+ }
764
+ c.getSelection().selectRanges(m);
765
+ }
766
+ },
767
+ onLoad: function () {
768
+ c.config.linkShowAdvancedTab || this.hidePage('advanced');
769
+ c.config.linkShowTargetTab || this.hidePage('target');
770
+ },
771
+ onFocus: function () {
772
+ var a = this.getContentElement('info', 'linkType');
773
+ a && 'url' == a.getValue() && ((a = this.getContentElement('info', 'url')), a.select());
774
+ },
775
+ };
776
+ });
777
+ })();