TinyMCE Advanced - Version 4.4.1

Version Description

  • Updated for WordPress 4.6 and TinyMCE 4.4.1.
  • Fixed multisite saving bug.
  • Added new button in the Text editor to add or reset the line breaks. Adds line breaks only between tags. Works only when it detects that line breaks are missing so it doesn't reformat posts with removed paragraphs.
Download this release

Release Info

Developer azaozz
Plugin Icon 128x128 TinyMCE Advanced
Version 4.4.1
Comparing to
See all releases

Code changes from version 4.3.10.1 to 4.4.1

css/tadv-styles.css CHANGED
@@ -1,4 +1,10 @@
1
-
 
 
 
 
 
 
2
  .tadv-more-plugins label {
3
  font-weight: bold;
4
  padding: 0 10px;
@@ -142,6 +148,12 @@ ul.container,
142
  border: 1px solid #bbb;
143
  }
144
 
 
 
 
 
 
 
145
  .tadvdropzone .descr {
146
  display: none;
147
  }
1
+ /**
2
+ * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
3
+ * For more information please see tinymce-advanced.php.
4
+ *
5
+ * Copyright (c) 2007-2016 Andrew Ozz. All rights reserved.
6
+ */
7
+
8
  .tadv-more-plugins label {
9
  font-weight: bold;
10
  padding: 0 10px;
148
  border: 1px solid #bbb;
149
  }
150
 
151
+ #unuseddiv.highlighted,
152
+ .tadvdropzone.highlighted {
153
+ background-color: #efefe9;
154
+ border-color: #aaa;
155
+ }
156
+
157
  .tadvdropzone .descr {
158
  display: none;
159
  }
js/tadv.js CHANGED
@@ -1,4 +1,10 @@
1
- // TinyMCE Advanced
 
 
 
 
 
 
2
  jQuery( document ).ready( function( $ ) {
3
  var $importElement = $('#tadv-import'),
4
  $importError = $('#tadv-import-error');
@@ -14,16 +20,12 @@ jQuery( document ).ready( function( $ ) {
14
  ui.item.find('input.tadv-button').attr('name', toolbar_id + '[]');
15
  }
16
  },
17
- /*
18
  activate: function( event, ui ) {
19
- if ( this.id !== ui.sender.attr('id') ) {
20
- $(this).parent().css({ 'border-color': '#888' }); // , 'background-color': '#fafff9'
21
- }
22
  },
23
  deactivate: function( event, ui ) {
24
- $(this).parent().css({ 'border-color': '' }); // , 'background-color': ''
25
  },
26
- */
27
  revert: 300,
28
  opacity: 0.7,
29
  placeholder: 'tadv-placeholder',
@@ -35,6 +37,12 @@ jQuery( document ).ready( function( $ ) {
35
  $( '#tadv-mce-menu' ).toggleClass( 'enabled', $(this).prop('checked') );
36
  });
37
 
 
 
 
 
 
 
38
  $('#tadv-export-select').click( function() {
39
  $('#tadv-export').focus().select();
40
  });
1
+ /**
2
+ * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
3
+ * For more information please see tinymce-advanced.php.
4
+ *
5
+ * Copyright (c) 2007-2016 Andrew Ozz. All rights reserved.
6
+ */
7
+
8
  jQuery( document ).ready( function( $ ) {
9
  var $importElement = $('#tadv-import'),
10
  $importError = $('#tadv-import-error');
20
  ui.item.find('input.tadv-button').attr('name', toolbar_id + '[]');
21
  }
22
  },
 
23
  activate: function( event, ui ) {
24
+ $(this).parent().addClass( 'highlighted' );
 
 
25
  },
26
  deactivate: function( event, ui ) {
27
+ $(this).parent().removeClass( 'highlighted' );
28
  },
 
29
  revert: 300,
30
  opacity: 0.7,
31
  placeholder: 'tadv-placeholder',
37
  $( '#tadv-mce-menu' ).toggleClass( 'enabled', $(this).prop('checked') );
38
  });
39
 
40
+ $( '#tadvadmins' ).on( 'submit', function() {
41
+ $( 'ul.container' ).each( function( i, node ) {
42
+ $( node ).find( '.tadv-button' ).attr( 'name', node.id ? node.id + '[]' : '' );
43
+ });
44
+ });
45
+
46
  $('#tadv-export-select').click( function() {
47
  $('#tadv-export').focus().select();
48
  });
langs/tinymce-advanced-de_DE.mo DELETED
Binary file
langs/tinymce-advanced-de_DE.po DELETED
@@ -1,365 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: TinyMCE Advanced 4.1.7\n"
4
- "POT-Creation-Date: 2016-03-17 12:21-0800\n"
5
- "PO-Revision-Date: 2016-03-17 12:23-0800\n"
6
- "Last-Translator: \n"
7
- "Language-Team: Fluchtsportler.de <kniebremser@fluchtsportler.de>\n"
8
- "Language: de_DE\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.9\n"
13
- "X-Poedit-Basepath: .\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
17
- "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPath-1: ..\n"
20
-
21
- #: ../tadv_admin.php:140
22
- msgid "Default settings restored."
23
- msgstr "Standardeinstellungen wiederhergestellt."
24
-
25
- #: ../tadv_admin.php:152
26
- msgid "TinyMCE Advanced Settings Export"
27
- msgstr "TinyMCE Advanced Einstellungen exportieren"
28
-
29
- #: ../tadv_admin.php:156
30
- msgid "The settings are exported as a JSON encoded string."
31
- msgstr "Die Einstellungen werden in einen JSON codierten String exportiert."
32
-
33
- #: ../tadv_admin.php:157
34
- msgid ""
35
- "Please copy the content and save it in a <b>text</b> (.txt) file, using a "
36
- "plain text editor like Notepad."
37
- msgstr ""
38
- "Bitte kopiere den Inhalt und speichere ihn in einer <b>Text</b> (.txt) "
39
- "Datei, verwende einen einfachen Text-Editor wie Notepad."
40
-
41
- #: ../tadv_admin.php:158
42
- msgid ""
43
- "It is important that the export is not changed in any way, no spaces, line "
44
- "breaks, etc."
45
- msgstr ""
46
- "Es ist wichtig, dass der Export nicht in irgendeiner Weise geändert wird, "
47
- "keine Leerzeichen, Zeilenumbrüche, etc."
48
-
49
- #: ../tadv_admin.php:163
50
- msgid "Select All"
51
- msgstr "Alles auswählen"
52
-
53
- #: ../tadv_admin.php:165 ../tadv_admin.php:191
54
- msgid "Back to Editor Settings"
55
- msgstr "Zurück zu Editor Einstellungen"
56
-
57
- #: ../tadv_admin.php:177
58
- msgid "TinyMCE Advanced Settings Import"
59
- msgstr "TinyMCE Advanced Einstellungen importieren"
60
-
61
- #: ../tadv_admin.php:180
62
- msgid ""
63
- "The settings are imported from a JSON encoded string. Please paste the "
64
- "exported string in the text area below."
65
- msgstr ""
66
- "Die Einstellungen werden von einem JSON codierten String importiert. Bitte "
67
- "füge den exportierten String in den folgenden Textbereich ein."
68
-
69
- #: ../tadv_admin.php:185
70
- msgid "Verify"
71
- msgstr "Verifizieren"
72
-
73
- #: ../tadv_admin.php:186
74
- msgid "Import"
75
- msgstr "Importieren"
76
-
77
- #: ../tadv_admin.php:216
78
- msgid "Importing of settings failed."
79
- msgstr "Importieren von Einstellungen fehlgeschlagen."
80
-
81
- #: ../tadv_admin.php:242
82
- msgid "ERROR: All toolbars are empty. Default settings loaded."
83
- msgstr "FEHLER: Alle Symbolleisten sind leer. Standardeinstellungen geladen."
84
-
85
- #: ../tadv_admin.php:254
86
- msgid "Editor Settings"
87
- msgstr "Editor Einstellungen"
88
-
89
- #: ../tadv_admin.php:261
90
- msgid "Settings saved."
91
- msgstr "Einstellungen gespeichert."
92
-
93
- #: ../tadv_admin.php:270 ../tadv_admin.php:540
94
- msgid "Save Changes"
95
- msgstr "Änderungen speichern"
96
-
97
- #: ../tadv_admin.php:277
98
- msgid "Enable the editor menu."
99
- msgstr "Aktiviere das Editor-Menü."
100
-
101
- #: ../tadv_admin.php:389
102
- msgid ""
103
- "Drag buttons from the unused buttons below and drop them in the toolbars "
104
- "above, or drag the buttons in the toolbars to rearrange them."
105
- msgstr ""
106
- "Ziehe den Button aus den nicht benutzten Buttons unterhalb und lege diesen "
107
- "in die Symbolleiste oberhalb ab, oder ziehe den Button in den Symbolleisten, "
108
- "um sie neu anzuordnen."
109
-
110
- #: ../tadv_admin.php:392
111
- msgid "Unused Buttons"
112
- msgstr "Unbenutzte Buttons"
113
-
114
- #: ../tadv_admin.php:434
115
- #, fuzzy
116
- msgid "Options"
117
- msgstr "Erweiterte Optionen"
118
-
119
- #: ../tadv_admin.php:437
120
- msgid "List Style Options"
121
- msgstr "Listenstil Optionen"
122
-
123
- #: ../tadv_admin.php:439
124
- msgid ""
125
- "Enable more list options: upper or lower case letters for ordered lists, "
126
- "disk or square for unordered lists, etc."
127
- msgstr ""
128
-
129
- #: ../tadv_admin.php:444
130
- msgid "Context Menu"
131
- msgstr "Kontextmenu"
132
-
133
- #: ../tadv_admin.php:446
134
- msgid "Replace the browser context (right-click) menu."
135
- msgstr ""
136
-
137
- #: ../tadv_admin.php:451
138
- msgid "Alternative link dialog"
139
- msgstr ""
140
-
141
- #: ../tadv_admin.php:453
142
- msgid ""
143
- "Open the TinyMCE link dialog when using the link button on the toolbar or "
144
- "the link menu item."
145
- msgstr ""
146
-
147
- #: ../tadv_admin.php:458
148
- msgid "Font sizes"
149
- msgstr ""
150
-
151
- #: ../tadv_admin.php:459
152
- msgid ""
153
- "Replace the size setting available for fonts with: 8px 10px 12px 14px 16px "
154
- "20px 24px 28px 32px 36px 48px 60px."
155
- msgstr ""
156
- "Ersetzt die Größeneinstellung für verfügbare Schriften mit: 8px 10px 12px "
157
- "14px 16px 20px 24px 28px 32px 36px 48px 60px."
158
-
159
- #: ../tadv_admin.php:467
160
- msgid "Advanced Options"
161
- msgstr "Erweiterte Optionen"
162
-
163
- #: ../tadv_admin.php:476
164
- msgid "Create CSS classes menu"
165
- msgstr ""
166
-
167
- #: ../tadv_admin.php:478
168
- msgid ""
169
- "Load the CSS classes used in editor-style.css and replace the Formats button "
170
- "and sub-menu."
171
- msgstr ""
172
- "Lade die verwendeten CSS Klassen aus editor-style.css und ersetze die "
173
- "Formate von Buttons und Untermenü."
174
-
175
- #: ../tadv_admin.php:488
176
- msgid "Keep paragraph tags"
177
- msgstr ""
178
-
179
- #: ../tadv_admin.php:490
180
- #, fuzzy
181
- msgid ""
182
- "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
183
- "in the Text editor."
184
- msgstr ""
185
- "Stoppe das Entfernen der &lt;p&gt; and &lt;br /&gt; Tags beim Speichern und "
186
- "zeige diese in dem Texteditor."
187
-
188
- #: ../tadv_admin.php:491
189
- msgid ""
190
- "This will make it possible to use more advanced coding in the HTML editor "
191
- "without the back-end filtering affecting it much."
192
- msgstr ""
193
- "Dadurch wird es möglich, erweiterte Codierung im HTML-Editor zu verwenden "
194
- "ohne das die Backend-Filterung viel beeinflusst."
195
-
196
- #: ../tadv_admin.php:492
197
- msgid ""
198
- "However it may behave unexpectedly in rare cases, so test it thoroughly "
199
- "before enabling it permanently."
200
- msgstr ""
201
- "Aber es kann in seltenen Fällen unerwartet reagieren, also teste es "
202
- "gründlich bevor Du es dauerhaft aktivierst."
203
-
204
- #: ../tadv_admin.php:493
205
- msgid ""
206
- "Line breaks in the HTML editor would still affect the output, in particular "
207
- "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
208
- "&gt; tags."
209
- msgstr ""
210
- "Zeilenumbrüche in dem HTML-Editor würden immer noch die Ausgabe "
211
- "beeinflussen, insbesondere verwende keine Leerzeilen, Zeilenumbrüche "
212
- "innerhalb von HTML Tags oder mehrere &lt;br /&gt; Tags."
213
-
214
- #: ../tadv_admin.php:498
215
- msgid "Enable pasting of image source"
216
- msgstr "Aktiviere Einfügen von Bildquelle"
217
-
218
- #: ../tadv_admin.php:500
219
- msgid ""
220
- "Works only in Firefox and Safari. These browsers support pasting of images "
221
- "directly in the editor and convert them to base64 encoded text."
222
- msgstr ""
223
- "Funktioniert nur in Firefox und Safari. Diese Browser unterstützen Einfügen "
224
- "von Bildern direkt im Editor und konvertieren dies zu base64 codierten Text."
225
-
226
- #: ../tadv_admin.php:501
227
- msgid ""
228
- "This is not acceptable for larger images like photos or graphics, but may be "
229
- "useful in some cases for very small images like icons, not larger than 2-3KB."
230
- msgstr ""
231
- "Dies ist nicht akzeptabel für größere Bilder wie Fotos oder Grafiken, aber "
232
- "kann in einigen Fällen für sehr kleine Bilder wie Icons nützlich sein, nicht "
233
- "größer als 2-3KB."
234
-
235
- #: ../tadv_admin.php:502
236
- msgid "These images will not be available in the Media Library."
237
- msgstr "Diese Bilder werden nicht in der Medienbibliothek verfügbar sein."
238
-
239
- #: ../tadv_admin.php:508
240
- msgid "Administration"
241
- msgstr "Administration"
242
-
243
- #: ../tadv_admin.php:510
244
- msgid "Settings import and export"
245
- msgstr ""
246
-
247
- #: ../tadv_admin.php:512
248
- msgid "Export Settings"
249
- msgstr "Einstellungen exportieren"
250
-
251
- #: ../tadv_admin.php:513
252
- msgid "Import Settings"
253
- msgstr "Einstellungen importieren"
254
-
255
- #: ../tadv_admin.php:517
256
- #, fuzzy
257
- msgid "Enable the editor enhancements for:"
258
- msgstr "Aktiviere das Editor-Menü."
259
-
260
- #: ../tadv_admin.php:520
261
- msgid "The main editor (Add New and Edit posts and pages)"
262
- msgstr ""
263
-
264
- #: ../tadv_admin.php:524
265
- msgid "Other editors in wp-admin"
266
- msgstr ""
267
-
268
- #: ../tadv_admin.php:528
269
- msgid "Editors on the front end of the site"
270
- msgstr ""
271
-
272
- #: ../tadv_admin.php:539
273
- msgid "Restore Default Settings"
274
- msgstr "Standardeinstellungen wiederherstellen"
275
-
276
- #: ../tadv_admin.php:545
277
- msgid ""
278
- "The [Toolbar toggle] button shows or hides the second, third, and forth "
279
- "button rows. It will only work when it is in the first row and there are "
280
- "buttons in the second row."
281
- msgstr ""
282
- "Der [Werkzeugleisten] Button zeigt oder verbirgt die zweite, dritte oder "
283
- "vierte Button Reihe. Er wird nur funktionieren, wenn er in der ersten Reihe "
284
- "ist und Buttons sich in der zweiten Reihe befinden."
285
-
286
- #: ../tinymce-advanced.php:221
287
- #, php-format
288
- msgid ""
289
- "TinyMCE Advanced requires WordPress version %1$s or newer. It appears that "
290
- "you are running %2$s. This can make the editor unstable."
291
- msgstr ""
292
- "TinyMCE Advanced requires WordPress version %1$s or newer. It appears that "
293
- "you are running %2$s. This can make the editor unstable."
294
-
295
- #: ../tinymce-advanced.php:228
296
- #, php-format
297
- msgid ""
298
- "Please upgrade your WordPress installation or download an <a href=\"%s"
299
- "\">older version of the plugin</a>."
300
- msgstr ""
301
- "Bitte aktualisiere deine WordPress Installation oder lade eine <a href=\"%s"
302
- "\"> ältere Version des Plugins</a> herunter."
303
-
304
- #: ../tinymce-advanced.php:703
305
- #, fuzzy
306
- msgid "Settings"
307
- msgstr "Editor Einstellungen"
308
-
309
- #~ msgid ""
310
- #~ "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
311
- #~ "most buttons are also available as menu items."
312
- #~ msgstr ""
313
- #~ "Neu in TinyMCE 4.0/WordPress 3.9 ist das Editor-Menü. Wenn es aktiviert "
314
- #~ "ist, sind die meisten Buttons auch als Menüeinträge verfügbar."
315
-
316
- #~ msgid "Also enable:"
317
- #~ msgstr "Auch aktivierbar:"
318
-
319
- #~ msgid "Link (replaces the Insert/Edit Link dialog)"
320
- #~ msgstr "Link (ersetzt den Einfügen/Bearbeiten Link Dialog)"
321
-
322
- #~ msgid "Import editor-style.css."
323
- #~ msgstr "Importiere editor-style.css."
324
-
325
- #~ msgid ""
326
- #~ "It seems your theme does not support customised styles for the editor."
327
- #~ msgstr ""
328
- #~ "Es scheint, dass dein Theme individuelle Stile für den Editor nicht "
329
- #~ "unterstützt."
330
-
331
- #~ msgid ""
332
- #~ "You can create a CSS file named <code>editor-style.css</code> and upload "
333
- #~ "it to your theme's directory."
334
- #~ msgstr ""
335
- #~ "Du kannst eine CSS-Datei namens <code>editor-style.css</code> erstellen "
336
- #~ "und in dein Theme Verzeichnis hochladen."
337
-
338
- #~ msgid "After that, enable this setting."
339
- #~ msgstr "Danach aktiviere diese Einstellung."
340
-
341
- #~ msgid "Replace font size settings"
342
- #~ msgstr "Ersetze Schriftgrößen Einstellungen"
343
-
344
- #~ msgid "Markdown typing support (text pattern plugin)"
345
- #~ msgstr "Markdown Eingabe Unterstützung (Textmuster Plugin)"
346
-
347
- #~ msgid ""
348
- #~ "This plugin matches special patterns while you type and applies formats "
349
- #~ "or executes commands on the matched text."
350
- #~ msgstr ""
351
- #~ "Dieses Plugin passt spezielle Muster an, während Du tippst und wendet "
352
- #~ "Formate an oder führt Befehle in dem gefundenen Text aus."
353
-
354
- #~ msgid ""
355
- #~ "The default patterns are the same as the markdown syntax so you can type "
356
- #~ "<code># text</code> to create a header, <code>1. text</code> to create a "
357
- #~ "list, <code>**text**</code> to make it bold, etc."
358
- #~ msgstr ""
359
- #~ "Die Standardmuster sind die gleichen wie beim Markdown-Syntax daher "
360
- #~ "kannst Du eingeben <code># text</code> zum Erstellen einer Kopfzeile "
361
- #~ "<code>1. text</code> zum Erstellen einer Liste <code>**text**</code> um "
362
- #~ "es Fett machen, etc."
363
-
364
- #~ msgid "More information"
365
- #~ msgstr "Weitere Informationen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
langs/tinymce-advanced-el.mo DELETED
Binary file
langs/tinymce-advanced-el.po DELETED
@@ -1,352 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: TinyMCE Advanced\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-03-17 12:21-0800\n"
6
- "PO-Revision-Date: 2016-03-17 12:23-0800\n"
7
- "Last-Translator: root <mellios@live.com>\n"
8
- "Language-Team: \n"
9
- "Language: el\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 1.6.9\n"
16
- "X-Poedit-Basepath: .\n"
17
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
18
- "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
19
- "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
20
- "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
21
- "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
22
- "X-Loco-Target-Locale: el_GR\n"
23
- "X-Poedit-SearchPath-0: .\n"
24
- "X-Poedit-SearchPath-1: ..\n"
25
-
26
- #: ../tadv_admin.php:140
27
- msgid "Default settings restored."
28
- msgstr "Έγινε επαναφορά των προκαθορισμένων ρυθμίσεων."
29
-
30
- #: ../tadv_admin.php:152
31
- msgid "TinyMCE Advanced Settings Export"
32
- msgstr "Εξαγωγή ρυθμίσεων του TinyMCE Advanced"
33
-
34
- #: ../tadv_admin.php:156
35
- msgid "The settings are exported as a JSON encoded string."
36
- msgstr "Οι ρυθμίσεις εξάγονται με κωδικοποίηση JSON."
37
-
38
- #: ../tadv_admin.php:157
39
- msgid ""
40
- "Please copy the content and save it in a <b>text</b> (.txt) file, using a "
41
- "plain text editor like Notepad."
42
- msgstr ""
43
- "Παρακαλώ αντιγράψτε το περιεχόμενο και αποθηκεύστε το σε ένα αρχείο "
44
- "<b>κειμένου</b> (.txt), χρησιμοποιώντας έναν επεξεργαστή κειμένου όπως το "
45
- "Notepad."
46
-
47
- #: ../tadv_admin.php:158
48
- msgid ""
49
- "It is important that the export is not changed in any way, no spaces, line "
50
- "breaks, etc."
51
- msgstr ""
52
- "Είναι σημαντικό να μην αλλαχτεί η εξαγωγή με οποιδήποτε τρόπο, ούτε με κενά, "
53
- "ούτε με αλλαγές γραμμών, κ.α.."
54
-
55
- #: ../tadv_admin.php:163
56
- msgid "Select All"
57
- msgstr "Επιλογή Όλων"
58
-
59
- #: ../tadv_admin.php:165 ../tadv_admin.php:191
60
- msgid "Back to Editor Settings"
61
- msgstr "Πίσω στις Ρυθμίσεις του Επεξεργαστή"
62
-
63
- #: ../tadv_admin.php:177
64
- msgid "TinyMCE Advanced Settings Import"
65
- msgstr "Εισαγωγή ρυθμίσεων του TinyMCE Advanced"
66
-
67
- #: ../tadv_admin.php:180
68
- msgid ""
69
- "The settings are imported from a JSON encoded string. Please paste the "
70
- "exported string in the text area below."
71
- msgstr ""
72
- "Οι ρυθμίσεις εισάγονται με κωδικοποίηση JSON. Παρακαλώ επικολλήστε το "
73
- "εξαγώμενο κείμενο στο παρακάτω πλαίσιο κειμένου."
74
-
75
- #: ../tadv_admin.php:185
76
- msgid "Verify"
77
- msgstr "Επαλήθευση"
78
-
79
- #: ../tadv_admin.php:186
80
- msgid "Import"
81
- msgstr "Εισαγωγή"
82
-
83
- #: ../tadv_admin.php:216
84
- msgid "Importing of settings failed."
85
- msgstr "Η εισαγωγή των ρυθμίσεων απέτυχε."
86
-
87
- #: ../tadv_admin.php:242
88
- msgid "ERROR: All toolbars are empty. Default settings loaded."
89
- msgstr ""
90
- "Λάθος: Όλες οι γραμμές εργαλείων είναι κενές. Φορτώθηκαν οι προκαθορισμένες "
91
- "ρυθμίσεις."
92
-
93
- #: ../tadv_admin.php:254
94
- msgid "Editor Settings"
95
- msgstr "Ρυθμίσεις Επεξεργαστή"
96
-
97
- #: ../tadv_admin.php:261
98
- msgid "Settings saved."
99
- msgstr "Οι ρυθμίσεις αποθηκεύτηκαν."
100
-
101
- #: ../tadv_admin.php:270 ../tadv_admin.php:540
102
- msgid "Save Changes"
103
- msgstr "Αποθήκευση αλλαγών"
104
-
105
- #: ../tadv_admin.php:277
106
- msgid "Enable the editor menu."
107
- msgstr "Ενεργοποίηση του μενού του επεξεργαστή."
108
-
109
- #: ../tadv_admin.php:389
110
- msgid ""
111
- "Drag buttons from the unused buttons below and drop them in the toolbars "
112
- "above, or drag the buttons in the toolbars to rearrange them."
113
- msgstr ""
114
- "Σύρετε τα κουμπιά από τα παρακάτω μη χρησιμοποιημένα κουμπιά και αφήστε τα "
115
- "στις παραπάνω γραμμές εργαλειών, ή σύρετε τα κουμπιά μέσα στις γραμμές "
116
- "εργαλειών για να τα αναδιατάξετε."
117
-
118
- #: ../tadv_admin.php:392
119
- msgid "Unused Buttons"
120
- msgstr "Μη χρησιμοποιημένα Κουμπιά"
121
-
122
- #: ../tadv_admin.php:434
123
- #, fuzzy
124
- msgid "Options"
125
- msgstr "Προχωρημένες Ρυθμίσεις"
126
-
127
- #: ../tadv_admin.php:437
128
- msgid "List Style Options"
129
- msgstr "Ρυθμίσεις Στυλ Λίστας"
130
-
131
- #: ../tadv_admin.php:439
132
- msgid ""
133
- "Enable more list options: upper or lower case letters for ordered lists, "
134
- "disk or square for unordered lists, etc."
135
- msgstr ""
136
-
137
- #: ../tadv_admin.php:444
138
- msgid "Context Menu"
139
- msgstr "Μενού περιεχομένου"
140
-
141
- #: ../tadv_admin.php:446
142
- msgid "Replace the browser context (right-click) menu."
143
- msgstr ""
144
-
145
- #: ../tadv_admin.php:451
146
- msgid "Alternative link dialog"
147
- msgstr ""
148
-
149
- #: ../tadv_admin.php:453
150
- msgid ""
151
- "Open the TinyMCE link dialog when using the link button on the toolbar or "
152
- "the link menu item."
153
- msgstr ""
154
-
155
- #: ../tadv_admin.php:458
156
- msgid "Font sizes"
157
- msgstr ""
158
-
159
- #: ../tadv_admin.php:459
160
- msgid ""
161
- "Replace the size setting available for fonts with: 8px 10px 12px 14px 16px "
162
- "20px 24px 28px 32px 36px 48px 60px."
163
- msgstr ""
164
- "Αντικαθιστά τις διαθέσιμες ρυθμίσεις μεγέθους για γραμματοσειρές με: 8px "
165
- "10px 12px 14px 16px 20px 24px 28px 32px 36px 48px 60px."
166
-
167
- #: ../tadv_admin.php:467
168
- msgid "Advanced Options"
169
- msgstr "Προχωρημένες Ρυθμίσεις"
170
-
171
- #: ../tadv_admin.php:476
172
- msgid "Create CSS classes menu"
173
- msgstr ""
174
-
175
- #: ../tadv_admin.php:478
176
- msgid ""
177
- "Load the CSS classes used in editor-style.css and replace the Formats button "
178
- "and sub-menu."
179
- msgstr ""
180
- "Φορτώστε τις κλάσεις CSS που χρησιμοποιούνται στο editor-style.css και "
181
- "αντικαταστήστε το κουμπί Μορφές και το υπο-μενού."
182
-
183
- #: ../tadv_admin.php:488
184
- msgid "Keep paragraph tags"
185
- msgstr ""
186
-
187
- #: ../tadv_admin.php:490
188
- #, fuzzy
189
- msgid ""
190
- "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
191
- "in the Text editor."
192
- msgstr ""
193
- "Να μην αφαιρούνται οι ετικέτες &lt;p&gt; και &lt;br /&gt; όταν γίνεται "
194
- "αποθήκευση και να εμφανίζονται στον επεξεργαστή κειμένου"
195
-
196
- #: ../tadv_admin.php:491
197
- msgid ""
198
- "This will make it possible to use more advanced coding in the HTML editor "
199
- "without the back-end filtering affecting it much."
200
- msgstr ""
201
- "Αυτό θα σας επιτρέψει να χρησιμοποιήσετε πιο προχωρημένο κώδικα στον "
202
- "επεξεργαστή HTML χωρίς να τον επηρεάζει πολύ το ενσωματωμένο φιλτράρισμα."
203
-
204
- #: ../tadv_admin.php:492
205
- msgid ""
206
- "However it may behave unexpectedly in rare cases, so test it thoroughly "
207
- "before enabling it permanently."
208
- msgstr ""
209
- "Παρόλο που μπορεί να συμπεριφερθεί μη αναμενόμενα σε σπάνιες περιπτώσεις, "
210
- "δοκιμάστε το πλήρως πριν το ενεργοποιήσετε μόνιμα."
211
-
212
- #: ../tadv_admin.php:493
213
- msgid ""
214
- "Line breaks in the HTML editor would still affect the output, in particular "
215
- "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
216
- "&gt; tags."
217
- msgstr ""
218
- "Οι αλλαγές γραμμών στον επεξεργαστή HTML θα συνεχίσουν να επηρεάζουν το "
219
- "αποτέλεσμα, συγκεκριμένα μη χρησιμοποιείτε κενές γραμμές, αλλαγές γραμμών "
220
- "ανάμεσα σε ετικέτες HTML ή σε πολλαπλές ετικέτες &lt;br /&gt;."
221
-
222
- #: ../tadv_admin.php:498
223
- msgid "Enable pasting of image source"
224
- msgstr "Ενεργοποίηση επικόλλησης της πηγής εικόνας"
225
-
226
- #: ../tadv_admin.php:500
227
- msgid ""
228
- "Works only in Firefox and Safari. These browsers support pasting of images "
229
- "directly in the editor and convert them to base64 encoded text."
230
- msgstr ""
231
- "Δουλεύει μόνο σε Firefox και Safari. Αυτοί οι browsers υποστηρίζουν την "
232
- "απευθείας επικόλληση εικόνων στον επεξεργαστή και την μετατροπή τους σε "
233
- "κείμενο με κωδικοποίηση base64."
234
-
235
- #: ../tadv_admin.php:501
236
- msgid ""
237
- "This is not acceptable for larger images like photos or graphics, but may be "
238
- "useful in some cases for very small images like icons, not larger than 2-3KB."
239
- msgstr ""
240
- "Αυτό δεν είναι επιτρεπτό για μεγαλύτερες εικόνες όπως φωτοτγραφίες ή "
241
- "γραφικά, αλλά ίσως να είναι χρήσιμο σε περιπτώσεις όπως πολύ μικρές εικόνες "
242
- "όπως τα εικονίδια, όχι μεγαλύτερα από 2-3ΚΒ."
243
-
244
- #: ../tadv_admin.php:502
245
- msgid "These images will not be available in the Media Library."
246
- msgstr "Αυτές οι εικόνες δε θα είναι διαθέσιμες στη Βιβλιοθήκη Πολυμέσων."
247
-
248
- #: ../tadv_admin.php:508
249
- msgid "Administration"
250
- msgstr "Διαχείριση"
251
-
252
- #: ../tadv_admin.php:510
253
- msgid "Settings import and export"
254
- msgstr ""
255
-
256
- #: ../tadv_admin.php:512
257
- msgid "Export Settings"
258
- msgstr "Εξαγωγή Ρυθμίσεων"
259
-
260
- #: ../tadv_admin.php:513
261
- msgid "Import Settings"
262
- msgstr "Εισαγωγή Ρυθμίσεων"
263
-
264
- #: ../tadv_admin.php:517
265
- #, fuzzy
266
- msgid "Enable the editor enhancements for:"
267
- msgstr "Ενεργοποίηση του μενού του επεξεργαστή."
268
-
269
- #: ../tadv_admin.php:520
270
- msgid "The main editor (Add New and Edit posts and pages)"
271
- msgstr ""
272
-
273
- #: ../tadv_admin.php:524
274
- msgid "Other editors in wp-admin"
275
- msgstr ""
276
-
277
- #: ../tadv_admin.php:528
278
- msgid "Editors on the front end of the site"
279
- msgstr ""
280
-
281
- #: ../tadv_admin.php:539
282
- msgid "Restore Default Settings"
283
- msgstr "Επαναφορά Προκαθορισμένων Ρυθμίσεων"
284
-
285
- #: ../tadv_admin.php:545
286
- msgid ""
287
- "The [Toolbar toggle] button shows or hides the second, third, and forth "
288
- "button rows. It will only work when it is in the first row and there are "
289
- "buttons in the second row."
290
- msgstr ""
291
- "Το κουμπί [Toolbar toggle] εμφανίζει ή εξαφανίζει τη δεύτερη, τρίτη, και "
292
- "τέταρτη σειρά κουμπιών. Λειτουργεί μόνο όταν βρίσκεται στη πρώτη γραμμή και "
293
- "υπάρχουν κουμπιά στη δεύτερη γραμμή."
294
-
295
- #: ../tinymce-advanced.php:221
296
- #, php-format
297
- msgid ""
298
- "TinyMCE Advanced requires WordPress version %1$s or newer. It appears that "
299
- "you are running %2$s. This can make the editor unstable."
300
- msgstr ""
301
- "Το TinyMCE Advanced απαιτεί έκδοση %1$s ή νεότερη του WordPress. Φαίνεται "
302
- "πως έχετε την έκδοση %2$s. Αυτό μπορεί να κάνει τον επεξεργαστή ασταθή."
303
-
304
- #: ../tinymce-advanced.php:228
305
- #, php-format
306
- msgid ""
307
- "Please upgrade your WordPress installation or download an <a href=\"%s"
308
- "\">older version of the plugin</a>."
309
- msgstr ""
310
- "Παρακαλώ αναβαθμίστε την εγκατάσταση του WordPress ή κατεβάστε μια <a href="
311
- "\"%s\">παλαιότερη έκδοση του πρόσθετου</a>."
312
-
313
- #: ../tinymce-advanced.php:703
314
- #, fuzzy
315
- msgid "Settings"
316
- msgstr "Ρυθμίσεις Επεξεργαστή"
317
-
318
- #~ msgid ""
319
- #~ "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
320
- #~ "most buttons are also available as menu items."
321
- #~ msgstr ""
322
- #~ "Το καινούριο στο TinyMCE 4.0/WordPress 3.9 είναι το μενού του "
323
- #~ "επεξεργαστή. Όταν είναι ενεργοποιημένο, τα περισσότερα κουμπιά είναι "
324
- #~ "επίσης διαθέσιμα ως στοιχεία του μενού."
325
-
326
- #~ msgid "Also enable:"
327
- #~ msgstr "Ενεργοποιήστε επίσης:"
328
-
329
- #~ msgid "Link (replaces the Insert/Edit Link dialog)"
330
- #~ msgstr "Σύνδεσμος (αντικαθιστά τον διάλογο Εισαγωγή/Επεξεργασία Συνδέσμου)"
331
-
332
- #~ msgid "Import editor-style.css."
333
- #~ msgstr "Εισαγωγή του editor-style.css."
334
-
335
- #~ msgid ""
336
- #~ "It seems your theme does not support customised styles for the editor."
337
- #~ msgstr ""
338
- #~ "Φαίνεται πως το θέμα σας δεν υποστηρίζει προσαρμοσμένα στυλ του "
339
- #~ "επεξεργαστή."
340
-
341
- #~ msgid ""
342
- #~ "You can create a CSS file named <code>editor-style.css</code> and upload "
343
- #~ "it to your theme's directory."
344
- #~ msgstr ""
345
- #~ "Μπορείτε να δημιουργήσετε ένα αρχείο CSS με το όνομα <code>editor-style."
346
- #~ "css</code> και να το μεταφορτώσετε στο φάκελο του θέματός σας."
347
-
348
- #~ msgid "After that, enable this setting."
349
- #~ msgstr "Μετά από αυτό, ενεργοποιήστε αυτή τη ρύθμιση."
350
-
351
- #~ msgid "Replace font size settings"
352
- #~ msgstr "Αντικατάσταση ρυθμίσεων μεγέθους γραμματοσειράς"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
langs/tinymce-advanced-fr_FR.mo DELETED
Binary file
langs/tinymce-advanced-fr_FR.po DELETED
@@ -1,365 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: TinyMCE Advanced\n"
4
- "POT-Creation-Date: 2016-03-17 12:21-0800\n"
5
- "PO-Revision-Date: 2016-03-17 12:23-0800\n"
6
- "Last-Translator: \n"
7
- "Language-Team: \n"
8
- "Language: fr_FR\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.9\n"
13
- "X-Poedit-Basepath: .\n"
14
- "Plural-Forms: nplurals=2; plural=(n > 1);\n"
15
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
17
- "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPath-1: ..\n"
20
-
21
- #: ../tadv_admin.php:140
22
- msgid "Default settings restored."
23
- msgstr "Les paramètres par défaut restaurés."
24
-
25
- #: ../tadv_admin.php:152
26
- msgid "TinyMCE Advanced Settings Export"
27
- msgstr "Réglages d'exportation de TinyMCE Advanced "
28
-
29
- #: ../tadv_admin.php:156
30
- msgid "The settings are exported as a JSON encoded string."
31
- msgstr "Les paramètres sont exportés sous forme de chaîne JSON codée."
32
-
33
- #: ../tadv_admin.php:157
34
- msgid ""
35
- "Please copy the content and save it in a <b>text</b> (.txt) file, using a "
36
- "plain text editor like Notepad."
37
- msgstr ""
38
- "S'il vous plaît copier le contenu et l'enregistrer dans un fichier <b>texte</"
39
- "b> (.txt), en utilisant un éditeur de texte comme Notepad."
40
-
41
- #: ../tadv_admin.php:158
42
- msgid ""
43
- "It is important that the export is not changed in any way, no spaces, line "
44
- "breaks, etc."
45
- msgstr ""
46
- "Il est important que l'exportation n'a pas changé en aucune manière, pas "
47
- "d'espaces, sauts de ligne, etc."
48
-
49
- #: ../tadv_admin.php:163
50
- msgid "Select All"
51
- msgstr "Sélectionner tout"
52
-
53
- #: ../tadv_admin.php:165 ../tadv_admin.php:191
54
- msgid "Back to Editor Settings"
55
- msgstr "Retour aux paramètres de l'éditeur"
56
-
57
- #: ../tadv_admin.php:177
58
- msgid "TinyMCE Advanced Settings Import"
59
- msgstr "Réglages d'importation de TinyMCE Advanced "
60
-
61
- #: ../tadv_admin.php:180
62
- msgid ""
63
- "The settings are imported from a JSON encoded string. Please paste the "
64
- "exported string in the text area below."
65
- msgstr ""
66
- "Les paramètres sont importés à partir d'une chaîne JSON codée. S'il vous "
67
- "plaît collez la chaîne exporté dans la zone de texte ci-dessous."
68
-
69
- #: ../tadv_admin.php:185
70
- msgid "Verify"
71
- msgstr "Vérifier"
72
-
73
- #: ../tadv_admin.php:186
74
- msgid "Import"
75
- msgstr "Importer"
76
-
77
- #: ../tadv_admin.php:216
78
- msgid "Importing of settings failed."
79
- msgstr "Importation des paramètres échoué."
80
-
81
- #: ../tadv_admin.php:242
82
- msgid "ERROR: All toolbars are empty. Default settings loaded."
83
- msgstr ""
84
- "Erreur: Tous les barres d'outils sont vides. Les réglages par défaut chargés."
85
-
86
- #: ../tadv_admin.php:254
87
- msgid "Editor Settings"
88
- msgstr "Paramètres de l'éditeur"
89
-
90
- #: ../tadv_admin.php:261
91
- msgid "Settings saved."
92
- msgstr "Paramètres sauvegardés."
93
-
94
- #: ../tadv_admin.php:270 ../tadv_admin.php:540
95
- msgid "Save Changes"
96
- msgstr "Sauvegarder les changements"
97
-
98
- #: ../tadv_admin.php:277
99
- msgid "Enable the editor menu."
100
- msgstr "Activez le menu de l'éditeur."
101
-
102
- #: ../tadv_admin.php:389
103
- msgid ""
104
- "Drag buttons from the unused buttons below and drop them in the toolbars "
105
- "above, or drag the buttons in the toolbars to rearrange them."
106
- msgstr ""
107
- "Faites glisser les boutons inutilisés ci-dessous et déposez-les dans les "
108
- "barres d'outils ci-dessus, ou faites glisser les boutons dans les barres "
109
- "d'outils pour les réorganiser."
110
-
111
- #: ../tadv_admin.php:392
112
- msgid "Unused Buttons"
113
- msgstr "Boutons inutilisés"
114
-
115
- #: ../tadv_admin.php:434
116
- #, fuzzy
117
- msgid "Options"
118
- msgstr "Options avancées"
119
-
120
- #: ../tadv_admin.php:437
121
- msgid "List Style Options"
122
- msgstr "Options de style de liste"
123
-
124
- #: ../tadv_admin.php:439
125
- msgid ""
126
- "Enable more list options: upper or lower case letters for ordered lists, "
127
- "disk or square for unordered lists, etc."
128
- msgstr ""
129
-
130
- #: ../tadv_admin.php:444
131
- msgid "Context Menu"
132
- msgstr "Menu contextuel"
133
-
134
- #: ../tadv_admin.php:446
135
- msgid "Replace the browser context (right-click) menu."
136
- msgstr ""
137
-
138
- #: ../tadv_admin.php:451
139
- msgid "Alternative link dialog"
140
- msgstr ""
141
-
142
- #: ../tadv_admin.php:453
143
- msgid ""
144
- "Open the TinyMCE link dialog when using the link button on the toolbar or "
145
- "the link menu item."
146
- msgstr ""
147
-
148
- #: ../tadv_admin.php:458
149
- msgid "Font sizes"
150
- msgstr ""
151
-
152
- #: ../tadv_admin.php:459
153
- msgid ""
154
- "Replace the size setting available for fonts with: 8px 10px 12px 14px 16px "
155
- "20px 24px 28px 32px 36px 48px 60px."
156
- msgstr ""
157
- "Remplace le réglage de la taille disponible pour les polices avec: 8px 10px "
158
- "12px 14px 16px 20px 24px 28px 32px 36px 48px 60px."
159
-
160
- #: ../tadv_admin.php:467
161
- msgid "Advanced Options"
162
- msgstr "Options avancées"
163
-
164
- #: ../tadv_admin.php:476
165
- msgid "Create CSS classes menu"
166
- msgstr ""
167
-
168
- #: ../tadv_admin.php:478
169
- msgid ""
170
- "Load the CSS classes used in editor-style.css and replace the Formats button "
171
- "and sub-menu."
172
- msgstr ""
173
- "Chargez les classes CSS utilisées dans editor-style.css et remplacer le "
174
- "bouton Formats et sous-menus."
175
-
176
- #: ../tadv_admin.php:488
177
- msgid "Keep paragraph tags"
178
- msgstr ""
179
-
180
- #: ../tadv_admin.php:490
181
- #, fuzzy
182
- msgid ""
183
- "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
184
- "in the Text editor."
185
- msgstr ""
186
- "Arrêtez de retirer les balises &lt;p&gt; et &lt;br /&gt; lors de "
187
- "l'enregistrement et les affiche dans l'éditeur de texte"
188
-
189
- #: ../tadv_admin.php:491
190
- msgid ""
191
- "This will make it possible to use more advanced coding in the HTML editor "
192
- "without the back-end filtering affecting it much."
193
- msgstr ""
194
- "Ainsi, il sera possible d'utiliser le codage plus avancé dans l'éditeur HTML "
195
- "sans le filtrage back-end qui affecte beaucoup."
196
-
197
- #: ../tadv_admin.php:492
198
- msgid ""
199
- "However it may behave unexpectedly in rare cases, so test it thoroughly "
200
- "before enabling it permanently."
201
- msgstr ""
202
- "Cependant, il peut se comporter de façon inattendue dans de rares cas, si le "
203
- "tester à fond avant de l'activer de façon permanente."
204
-
205
- #: ../tadv_admin.php:493
206
- msgid ""
207
- "Line breaks in the HTML editor would still affect the output, in particular "
208
- "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
209
- "&gt; tags."
210
- msgstr ""
211
- "Sauts de ligne dans l'éditeur HTML seraient encore affecter la sortie, en "
212
- "particulier, ne pas utiliser des lignes vides, les sauts de ligne à "
213
- "l'intérieur de balises HTML ou multiple balises &lt;br /&gt;."
214
-
215
- #: ../tadv_admin.php:498
216
- msgid "Enable pasting of image source"
217
- msgstr "Activer coller de la source de l'image"
218
-
219
- #: ../tadv_admin.php:500
220
- msgid ""
221
- "Works only in Firefox and Safari. These browsers support pasting of images "
222
- "directly in the editor and convert them to base64 encoded text."
223
- msgstr ""
224
- "Fonctionne uniquement dans Firefox et Safari. Ces navigateurs supportent le "
225
- "coller des images directement dans l'éditeur et les convertir en texte "
226
- "base64."
227
-
228
- #: ../tadv_admin.php:501
229
- msgid ""
230
- "This is not acceptable for larger images like photos or graphics, but may be "
231
- "useful in some cases for very small images like icons, not larger than 2-3KB."
232
- msgstr ""
233
- "Cette situation est inacceptable pour les grandes images comme des photos ou "
234
- "des graphiques, mais peut être utile dans certains cas pour les très petites "
235
- "images comme icônes, pas plus grands que 2-3KB."
236
-
237
- #: ../tadv_admin.php:502
238
- msgid "These images will not be available in the Media Library."
239
- msgstr "Ces images ne seront pas disponibles dans la bibliothèque multimédia."
240
-
241
- #: ../tadv_admin.php:508
242
- msgid "Administration"
243
- msgstr "Administration"
244
-
245
- #: ../tadv_admin.php:510
246
- msgid "Settings import and export"
247
- msgstr ""
248
-
249
- #: ../tadv_admin.php:512
250
- msgid "Export Settings"
251
- msgstr "Réglages d'exportation"
252
-
253
- #: ../tadv_admin.php:513
254
- msgid "Import Settings"
255
- msgstr "Réglages d'importation"
256
-
257
- #: ../tadv_admin.php:517
258
- #, fuzzy
259
- msgid "Enable the editor enhancements for:"
260
- msgstr "Activez le menu de l'éditeur."
261
-
262
- #: ../tadv_admin.php:520
263
- msgid "The main editor (Add New and Edit posts and pages)"
264
- msgstr ""
265
-
266
- #: ../tadv_admin.php:524
267
- msgid "Other editors in wp-admin"
268
- msgstr ""
269
-
270
- #: ../tadv_admin.php:528
271
- msgid "Editors on the front end of the site"
272
- msgstr ""
273
-
274
- #: ../tadv_admin.php:539
275
- msgid "Restore Default Settings"
276
- msgstr "Restaurer les paramètres par défaut"
277
-
278
- #: ../tadv_admin.php:545
279
- msgid ""
280
- "The [Toolbar toggle] button shows or hides the second, third, and forth "
281
- "button rows. It will only work when it is in the first row and there are "
282
- "buttons in the second row."
283
- msgstr ""
284
- "Le bouton [Barre d'outils] bascule sur afficher ou masquer les deuxième, "
285
- "troisième, et quatrième rangées de boutons. Il ne fonctionne que quand il "
286
- "est dans la première rangée et il ya des boutons de la deuxième rangée."
287
-
288
- #: ../tinymce-advanced.php:221
289
- #, fuzzy, php-format
290
- msgid ""
291
- "TinyMCE Advanced requires WordPress version %1$s or newer. It appears that "
292
- "you are running %2$s. This can make the editor unstable."
293
- msgstr ""
294
- "Ce plugin nécessite la version WordPress %1$s ou plus récent. Il semble que "
295
- "vous utilisez la version %2$s. Cela peut rendre l'éditeur instable."
296
-
297
- #: ../tinymce-advanced.php:228
298
- #, php-format
299
- msgid ""
300
- "Please upgrade your WordPress installation or download an <a href=\"%s"
301
- "\">older version of the plugin</a>."
302
- msgstr ""
303
- "S'il vous plaît mettre à jour votre installation de WordPress ou télécharger "
304
- "une <a href=\"%s\">ancienne version du plugin</a>."
305
-
306
- #: ../tinymce-advanced.php:703
307
- #, fuzzy
308
- msgid "Settings"
309
- msgstr "Paramètres de l'éditeur"
310
-
311
- #~ msgid ""
312
- #~ "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
313
- #~ "most buttons are also available as menu items."
314
- #~ msgstr ""
315
- #~ "Nouveau dans TinyMCE 4.0 / WordPress 3.9 est le menu de l'éditeur. Quand "
316
- #~ "il est activé, la plupart des boutons sont également disponibles comme "
317
- #~ "des éléments de menu."
318
-
319
- #~ msgid "Also enable:"
320
- #~ msgstr "Permettre également:"
321
-
322
- #~ msgid "Link (replaces the Insert/Edit Link dialog)"
323
- #~ msgstr "Lien (remplace la boîte de dialogue Insérer / Modifier Lien)"
324
-
325
- #~ msgid "Import editor-style.css."
326
- #~ msgstr "Importer editor-style.css."
327
-
328
- #~ msgid ""
329
- #~ "It seems your theme does not support customised styles for the editor."
330
- #~ msgstr ""
331
- #~ "Il semble que votre thème ne supporte pas les styles personnalisés pour "
332
- #~ "l'éditeur."
333
-
334
- #~ msgid ""
335
- #~ "You can create a CSS file named <code>editor-style.css</code> and upload "
336
- #~ "it to your theme's directory."
337
- #~ msgstr ""
338
- #~ "Vous pouvez créer un fichier CSS nommé <code>editor-style.css</code> et "
339
- #~ "de le transférer vers le répertoire de votre thème."
340
-
341
- #~ msgid "After that, enable this setting."
342
- #~ msgstr "Après cela, activez ce paramètre."
343
-
344
- #~ msgid "Replace font size settings"
345
- #~ msgstr "Remplacer les paramètres de taille de police"
346
-
347
- #~ msgid ""
348
- #~ "This plugin matches special patterns while you type and applies formats "
349
- #~ "or executes commands on the matched text."
350
- #~ msgstr ""
351
- #~ "Ce plugin correspond à motifs spéciaux pendant que vous tapez et applique "
352
- #~ "formats ou exécute des commandes sur le texte correspondant."
353
-
354
- #~ msgid ""
355
- #~ "The default patterns are the same as the markdown syntax so you can type "
356
- #~ "<code># text</code> to create a header, <code>1. text</code> to create a "
357
- #~ "list, <code>**text**</code> to make it bold, etc."
358
- #~ msgstr ""
359
- #~ "Les schémas par défaut sont les mêmes que la syntaxe Markdown de sorte "
360
- #~ "que vous pouvez taper <code># text</code> pour créer un en-tête, <code>1. "
361
- #~ "text</code> pour créer une liste,<code>**text**</code> pour mettre en "
362
- #~ "gras, etc."
363
-
364
- #~ msgid "More information"
365
- #~ msgstr "Plus d'informations"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
langs/tinymce-advanced-pl_PL.mo DELETED
Binary file
langs/tinymce-advanced-pl_PL.po DELETED
@@ -1,366 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: TinyMCE Advanced\n"
4
- "POT-Creation-Date: 2016-03-17 12:21-0800\n"
5
- "PO-Revision-Date: 2016-03-17 12:24-0800\n"
6
- "Last-Translator: \n"
7
- "Language-Team: \n"
8
- "Language: pl_PL\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.9\n"
13
- "X-Poedit-Basepath: .\n"
14
- "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
15
- "|| n%100>=20) ? 1 : 2);\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
17
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
18
- "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
- "X-Poedit-SearchPath-1: ..\n"
21
-
22
- #: ../tadv_admin.php:140
23
- msgid "Default settings restored."
24
- msgstr "Domyślne ustawienia przywrócone."
25
-
26
- #: ../tadv_admin.php:152
27
- msgid "TinyMCE Advanced Settings Export"
28
- msgstr "Eksport Ustawień TinyMCE Advanced"
29
-
30
- #: ../tadv_admin.php:156
31
- msgid "The settings are exported as a JSON encoded string."
32
- msgstr "Ustawienia zostaną wyeksportowane jako zakodowany tekst JSON."
33
-
34
- #: ../tadv_admin.php:157
35
- msgid ""
36
- "Please copy the content and save it in a <b>text</b> (.txt) file, using a "
37
- "plain text editor like Notepad."
38
- msgstr ""
39
- "Skopiuj tekst i zapisz go w pliku <b>tekstowym</b> (.txt), używając edytora "
40
- "zwykłego tekstu takiego jak Notatnik."
41
-
42
- #: ../tadv_admin.php:158
43
- msgid ""
44
- "It is important that the export is not changed in any way, no spaces, line "
45
- "breaks, etc."
46
- msgstr ""
47
- "Ważne jest, aby tekst nie został w żaden sposób zmieniony, żadnych spacji, "
48
- "nowych linii, itd."
49
-
50
- #: ../tadv_admin.php:163
51
- msgid "Select All"
52
- msgstr "Wybierz Wszystko"
53
-
54
- #: ../tadv_admin.php:165 ../tadv_admin.php:191
55
- msgid "Back to Editor Settings"
56
- msgstr "Powrót do Ustawień Edytora"
57
-
58
- #: ../tadv_admin.php:177
59
- msgid "TinyMCE Advanced Settings Import"
60
- msgstr "Import Ustawień TinyMCE Advanced"
61
-
62
- #: ../tadv_admin.php:180
63
- msgid ""
64
- "The settings are imported from a JSON encoded string. Please paste the "
65
- "exported string in the text area below."
66
- msgstr ""
67
- "Ustawienia zostaną zaimportowane z zakodowanego tekstu JSON. Wklej "
68
- "wyeksportowany tekst poniżej."
69
-
70
- #: ../tadv_admin.php:185
71
- msgid "Verify"
72
- msgstr "Zweryfikuj"
73
-
74
- #: ../tadv_admin.php:186
75
- msgid "Import"
76
- msgstr "Importuj"
77
-
78
- #: ../tadv_admin.php:216
79
- msgid "Importing of settings failed."
80
- msgstr "Importowanie ustawień nie powiodło się."
81
-
82
- #: ../tadv_admin.php:242
83
- msgid "ERROR: All toolbars are empty. Default settings loaded."
84
- msgstr ""
85
- "BŁĄD: Wszystkie paski narzędzi są puste. Domyślne ustawienia przywrócone."
86
-
87
- #: ../tadv_admin.php:254
88
- msgid "Editor Settings"
89
- msgstr "Ustawienia Edytora"
90
-
91
- #: ../tadv_admin.php:261
92
- msgid "Settings saved."
93
- msgstr "Ustawienia zapisane."
94
-
95
- #: ../tadv_admin.php:270 ../tadv_admin.php:540
96
- msgid "Save Changes"
97
- msgstr "Zapisz Zmiany"
98
-
99
- #: ../tadv_admin.php:277
100
- msgid "Enable the editor menu."
101
- msgstr "Włącz menu edytora."
102
-
103
- #: ../tadv_admin.php:389
104
- msgid ""
105
- "Drag buttons from the unused buttons below and drop them in the toolbars "
106
- "above, or drag the buttons in the toolbars to rearrange them."
107
- msgstr ""
108
- "Przeciągnij przyciski z nieużywanych przycisków poniżej i upuść je w paskach "
109
- "powyżej, lub przeciągnij je w paskach, by zmienić ich położenie."
110
-
111
- #: ../tadv_admin.php:392
112
- msgid "Unused Buttons"
113
- msgstr "Nieużywane przyciski"
114
-
115
- #: ../tadv_admin.php:434
116
- #, fuzzy
117
- msgid "Options"
118
- msgstr "Ustawienia Zaawansowane"
119
-
120
- #: ../tadv_admin.php:437
121
- msgid "List Style Options"
122
- msgstr "Ustawienia Stylu Listy"
123
-
124
- #: ../tadv_admin.php:439
125
- msgid ""
126
- "Enable more list options: upper or lower case letters for ordered lists, "
127
- "disk or square for unordered lists, etc."
128
- msgstr ""
129
-
130
- #: ../tadv_admin.php:444
131
- msgid "Context Menu"
132
- msgstr "Menu Kontekstowe"
133
-
134
- #: ../tadv_admin.php:446
135
- msgid "Replace the browser context (right-click) menu."
136
- msgstr ""
137
-
138
- #: ../tadv_admin.php:451
139
- msgid "Alternative link dialog"
140
- msgstr ""
141
-
142
- #: ../tadv_admin.php:453
143
- msgid ""
144
- "Open the TinyMCE link dialog when using the link button on the toolbar or "
145
- "the link menu item."
146
- msgstr ""
147
-
148
- #: ../tadv_admin.php:458
149
- msgid "Font sizes"
150
- msgstr ""
151
-
152
- #: ../tadv_admin.php:459
153
- msgid ""
154
- "Replace the size setting available for fonts with: 8px 10px 12px 14px 16px "
155
- "20px 24px 28px 32px 36px 48px 60px."
156
- msgstr ""
157
- "Zmienia dostępne rozmiary czcionki na: 8px 10px 12px 14px 16px 20px 24px "
158
- "28px 32px 36px 48px 60px."
159
-
160
- #: ../tadv_admin.php:467
161
- msgid "Advanced Options"
162
- msgstr "Ustawienia Zaawansowane"
163
-
164
- #: ../tadv_admin.php:476
165
- msgid "Create CSS classes menu"
166
- msgstr ""
167
-
168
- #: ../tadv_admin.php:478
169
- msgid ""
170
- "Load the CSS classes used in editor-style.css and replace the Formats button "
171
- "and sub-menu."
172
- msgstr ""
173
- "Załaduj klasy CSS użyte w editor-style.css i zmień przycisk oraz podmenu "
174
- "Formaty."
175
-
176
- #: ../tadv_admin.php:488
177
- msgid "Keep paragraph tags"
178
- msgstr ""
179
-
180
- #: ../tadv_admin.php:490
181
- #, fuzzy
182
- msgid ""
183
- "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
184
- "in the Text editor."
185
- msgstr ""
186
- "Przestań usuwać tagi &lt;p&gt; i &lt;br /&gt; podczas zapisywania i pokazuj "
187
- "je w edytorze Tekstowym."
188
-
189
- #: ../tadv_admin.php:491
190
- msgid ""
191
- "This will make it possible to use more advanced coding in the HTML editor "
192
- "without the back-end filtering affecting it much."
193
- msgstr ""
194
- "Umożliwi to zaawansowaną edycję w edytorze HTMLa bez szczególnego "
195
- "filtrowania backendu zbyt zmieniającego pisany kod."
196
-
197
- #: ../tadv_admin.php:492
198
- msgid ""
199
- "However it may behave unexpectedly in rare cases, so test it thoroughly "
200
- "before enabling it permanently."
201
- msgstr ""
202
- "Może to jednak zachowywać się nieprzewidzianie w rzadkich przypadkach, więc "
203
- "przetestuj tą opcję dogłębnie przed korzystaniem z niej na stałe."
204
-
205
- #: ../tadv_admin.php:493
206
- msgid ""
207
- "Line breaks in the HTML editor would still affect the output, in particular "
208
- "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
209
- "&gt; tags."
210
- msgstr ""
211
- "Znaki nowej linii w edytorze HTMLa nadal będą zmieniać wyjście, nie używaj "
212
- "pustych linii, nowych linii wewnątrz tagów HTMLa ani wielu tagów &lt;br /"
213
- "&gt;."
214
-
215
- #: ../tadv_admin.php:498
216
- msgid "Enable pasting of image source"
217
- msgstr "Włącz wklejanie źródeł obrazów."
218
-
219
- #: ../tadv_admin.php:500
220
- msgid ""
221
- "Works only in Firefox and Safari. These browsers support pasting of images "
222
- "directly in the editor and convert them to base64 encoded text."
223
- msgstr ""
224
- "Działa tylko w Firefoksie i Safari. Te przeglądarki umożliwiają wklejanie "
225
- "obrazów bezpośrednio w edytorze i ich konwersję do zakodowanego tekstu "
226
- "base64."
227
-
228
- #: ../tadv_admin.php:501
229
- msgid ""
230
- "This is not acceptable for larger images like photos or graphics, but may be "
231
- "useful in some cases for very small images like icons, not larger than 2-3KB."
232
- msgstr ""
233
- "Nie jest to sensowne dla dużych obrazów jak zdjęcia czy grafiki, ale może "
234
- "być przydatne dla bardzo małych obrazków jak ikony, nie większych niż 2-3KB."
235
-
236
- #: ../tadv_admin.php:502
237
- msgid "These images will not be available in the Media Library."
238
- msgstr "Obrazy te nie będą dostępne w Bibliotece Mediów."
239
-
240
- #: ../tadv_admin.php:508
241
- msgid "Administration"
242
- msgstr "Administracja"
243
-
244
- #: ../tadv_admin.php:510
245
- msgid "Settings import and export"
246
- msgstr ""
247
-
248
- #: ../tadv_admin.php:512
249
- msgid "Export Settings"
250
- msgstr "Eksport Ustawień"
251
-
252
- #: ../tadv_admin.php:513
253
- msgid "Import Settings"
254
- msgstr "Import Ustawień"
255
-
256
- #: ../tadv_admin.php:517
257
- #, fuzzy
258
- msgid "Enable the editor enhancements for:"
259
- msgstr "Włącz menu edytora."
260
-
261
- #: ../tadv_admin.php:520
262
- msgid "The main editor (Add New and Edit posts and pages)"
263
- msgstr ""
264
-
265
- #: ../tadv_admin.php:524
266
- msgid "Other editors in wp-admin"
267
- msgstr ""
268
-
269
- #: ../tadv_admin.php:528
270
- msgid "Editors on the front end of the site"
271
- msgstr ""
272
-
273
- #: ../tadv_admin.php:539
274
- msgid "Restore Default Settings"
275
- msgstr "Przywróć Domyślne Ustawienia"
276
-
277
- #: ../tadv_admin.php:545
278
- msgid ""
279
- "The [Toolbar toggle] button shows or hides the second, third, and forth "
280
- "button rows. It will only work when it is in the first row and there are "
281
- "buttons in the second row."
282
- msgstr ""
283
- "Przycisk [Przełącz widoczność paska narzędzi] pokazuje lub ukrywa drugi, "
284
- "trzeci i czwarty rząd przycisków. Będzie działać tylko jeśli jest w "
285
- "pierwszym rzędzie i istnieją przyciski w drugim."
286
-
287
- #: ../tinymce-advanced.php:221
288
- #, php-format
289
- msgid ""
290
- "TinyMCE Advanced requires WordPress version %1$s or newer. It appears that "
291
- "you are running %2$s. This can make the editor unstable."
292
- msgstr ""
293
- "TinyMCE Advanced requires WordPress version %1$s or newer. It appears that "
294
- "you are running %2$s. This can make the editor unstable."
295
-
296
- #: ../tinymce-advanced.php:228
297
- #, php-format
298
- msgid ""
299
- "Please upgrade your WordPress installation or download an <a href=\"%s"
300
- "\">older version of the plugin</a>."
301
- msgstr ""
302
- "Zaktualizuj swoją instalację WordPressa lub pobierz <a href=\"%s\">starszą "
303
- "wersję tej wtyczki</a>."
304
-
305
- #: ../tinymce-advanced.php:703
306
- #, fuzzy
307
- msgid "Settings"
308
- msgstr "Ustawienia Edytora"
309
-
310
- #~ msgid ""
311
- #~ "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
312
- #~ "most buttons are also available as menu items."
313
- #~ msgstr ""
314
- #~ "Nowością w TinyMCE 4.0/WordPressie 3.9 jest menu edytora. Gdy włączone, "
315
- #~ "większość przycisków dostępne jest również jako opcje w menu."
316
-
317
- #~ msgid "Also enable:"
318
- #~ msgstr "Włącz również:"
319
-
320
- #~ msgid "Link (replaces the Insert/Edit Link dialog)"
321
- #~ msgstr "Link (zastępuje okno Wstaw/Edytuj Link)"
322
-
323
- #~ msgid "Import editor-style.css."
324
- #~ msgstr "Zaimportuj editor-style.css."
325
-
326
- #~ msgid ""
327
- #~ "It seems your theme does not support customised styles for the editor."
328
- #~ msgstr ""
329
- #~ "Wygląda na to, że twój motyw nie wspiera zmodyfikowanych stylów dla "
330
- #~ "edytora."
331
-
332
- #~ msgid ""
333
- #~ "You can create a CSS file named <code>editor-style.css</code> and upload "
334
- #~ "it to your theme's directory."
335
- #~ msgstr ""
336
- #~ "Możesz utworzyć plik CSS nazwany <code>editor-style.css</code> i "
337
- #~ "załadować go do katalogu twojego motywu."
338
-
339
- #~ msgid "After that, enable this setting."
340
- #~ msgstr "Gdy to zrobisz, aktywuj tą opcję."
341
-
342
- #~ msgid "Replace font size settings"
343
- #~ msgstr "Zmień ustawienia rozmiaru czcionki"
344
-
345
- #~ msgid "Markdown typing support (text pattern plugin)"
346
- #~ msgstr "Wsparcie Markdown (wtyczka szablonu tekstu)"
347
-
348
- #~ msgid ""
349
- #~ "This plugin matches special patterns while you type and applies formats "
350
- #~ "or executes commands on the matched text."
351
- #~ msgstr ""
352
- #~ "Ta wtyczka będzie oznaczać specjalne wyrażenia podczas pisania i "
353
- #~ "automatycznie dodawać formatowanie lub wykonywać polecenia na oznaczonym "
354
- #~ "tekście."
355
-
356
- #~ msgid ""
357
- #~ "The default patterns are the same as the markdown syntax so you can type "
358
- #~ "<code># text</code> to create a header, <code>1. text</code> to create a "
359
- #~ "list, <code>**text**</code> to make it bold, etc."
360
- #~ msgstr ""
361
- #~ "Domyślnie działa to jak Markdown, więc możesz napisać <code># tekst</"
362
- #~ "code> aby stworzyć nagłówek, <code>1. tekst</code> aby stworzyć listę, "
363
- #~ "<code>**tekst**</code> aby pogrubić, itd."
364
-
365
- #~ msgid "More information"
366
- #~ msgstr "Więcej informacji"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mce/advlist/plugin.js CHANGED
@@ -44,7 +44,11 @@ tinymce.PluginManager.add('advlist', function(editor) {
44
 
45
  // Switch/add list type if needed
46
  if (!list || list.nodeName != listName || styleValue === false) {
47
- editor.execCommand(listName == 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList');
 
 
 
 
48
  }
49
 
50
  // Set style
44
 
45
  // Switch/add list type if needed
46
  if (!list || list.nodeName != listName || styleValue === false) {
47
+ var detail = {
48
+ 'list-style-type': styleValue ? styleValue : ''
49
+ };
50
+
51
+ editor.execCommand(listName == 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList', false, detail);
52
  }
53
 
54
  // Set style
mce/advlist/plugin.min.js CHANGED
@@ -1 +1 @@
1
- tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;d=e.getParent(f.getNode(),"ol,ul"),d&&d.nodeName==b&&c!==!1||a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList"),c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})});
1
+ tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;if(d=e.getParent(f.getNode(),"ol,ul"),!d||d.nodeName!=b||c===!1){var h={"list-style-type":c?c:""};a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList",!1,h)}c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})});
mce/table/plugin.js CHANGED
@@ -518,8 +518,22 @@ define("tinymce/tableplugin/TableGrid", [
518
 
519
  // Set row/col span to start cell
520
  startCell = getCell(startX, startY).elm;
521
- setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
522
- setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
 
524
  // Remove other cells and add it's contents to the start cell
525
  for (y = startY; y <= endY; y++) {
@@ -561,7 +575,7 @@ define("tinymce/tableplugin/TableGrid", [
561
  }
562
 
563
  function insertRow(before) {
564
- var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
565
 
566
  // Find first/last row
567
  each(grid, function(row, y) {
@@ -588,13 +602,14 @@ define("tinymce/tableplugin/TableGrid", [
588
  return;
589
  }
590
 
591
- for (x = 0; x < grid[0].length; x++) {
592
  // Cell not found could be because of an invalid table structure
593
  if (!grid[posY][x]) {
594
  continue;
595
  }
596
 
597
  cell = grid[posY][x].elm;
 
598
 
599
  if (cell != lastCell) {
600
  if (!before) {
@@ -815,13 +830,18 @@ define("tinymce/tableplugin/TableGrid", [
815
  function pasteRows(rows, before) {
816
  var selectedRows = getSelectedRows(),
817
  targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
818
- targetCellCount = targetRow.cells.length;
 
819
 
820
  // Nothing to paste
821
  if (!rows) {
822
  return;
823
  }
824
 
 
 
 
 
825
  // Calc target cell count
826
  each(grid, function(row) {
827
  var match;
@@ -843,10 +863,10 @@ define("tinymce/tableplugin/TableGrid", [
843
  });
844
 
845
  if (!before) {
846
- rows.reverse();
847
  }
848
 
849
- each(rows, function(row) {
850
  var i, cellCount = row.cells.length, cell;
851
 
852
  fireNewRow(row);
@@ -961,13 +981,15 @@ define("tinymce/tableplugin/TableGrid", [
961
  maxX = endX;
962
  maxY = endY;
963
 
 
964
  // Expand startX
965
- for (y = startY; y <= maxY; y++) {
966
  cell = grid[y][startX];
967
 
968
  if (!cell.real) {
969
- if (startX - (cell.colspan - 1) < startX) {
970
- startX -= cell.colspan - 1;
 
971
  }
972
  }
973
  }
@@ -977,11 +999,12 @@ define("tinymce/tableplugin/TableGrid", [
977
  cell = grid[startY][x];
978
 
979
  if (!cell.real) {
980
- if (startY - (cell.rowspan - 1) < startY) {
981
- startY -= cell.rowspan - 1;
 
982
  }
983
  }
984
- }
985
 
986
  // Find max X, Y
987
  for (y = startY; y <= endY; y++) {
@@ -1507,7 +1530,7 @@ define("tinymce/tableplugin/CellSelection", [
1507
  "tinymce/dom/TreeWalker",
1508
  "tinymce/util/Tools"
1509
  ], function(TableGrid, TreeWalker, Tools) {
1510
- return function(editor) {
1511
  var dom = editor.dom, tableGrid, startCell, startTable, lastMouseOverTarget, hasCellSelection = true, resizing;
1512
 
1513
  function clear(force) {
@@ -1520,6 +1543,11 @@ define("tinymce/tableplugin/CellSelection", [
1520
  }
1521
  }
1522
 
 
 
 
 
 
1523
  function isCellInTable(table, cell) {
1524
  if (!table || !cell) {
1525
  return false;
@@ -1554,6 +1582,8 @@ define("tinymce/tableplugin/CellSelection", [
1554
  return;
1555
  }
1556
 
 
 
1557
  if (isCellInTable(startTable, currentCell)) {
1558
  e.preventDefault();
1559
 
@@ -1668,13 +1698,13 @@ define("tinymce/tableplugin/CellSelection", [
1668
  }
1669
 
1670
  editor.nodeChanged();
1671
- startCell = tableGrid = startTable = lastMouseOverTarget = null;
1672
  }
1673
  });
1674
 
1675
  editor.on('KeyUp Drop SetContent', function(e) {
1676
  clear(e.type == 'setcontent');
1677
- startCell = tableGrid = startTable = lastMouseOverTarget = null;
1678
  resizing = false;
1679
  });
1680
 
@@ -3424,6 +3454,8 @@ define("tinymce/tableplugin/ResizeBars", [
3424
  var initialTop = editor.dom.getPos(target).y;
3425
  editor.dom.setAttrib(target, RESIZE_BAR_ROW_DATA_INITIAL_TOP_ATTRIBUTE, initialTop);
3426
  setupRowDrag(target);
 
 
3427
  }
3428
  }
3429
 
@@ -3851,7 +3883,11 @@ define("tinymce/tableplugin/Plugin", [
3851
  self.quirks = new Quirks(editor);
3852
 
3853
  editor.on('Init', function() {
3854
- self.cellSelection = new CellSelection(editor);
 
 
 
 
3855
  self.resizeBars = resizeBars;
3856
  });
3857
 
@@ -4069,6 +4105,14 @@ define("tinymce/tableplugin/Plugin", [
4069
  );
4070
  }
4071
 
 
 
 
 
 
 
 
 
4072
  addButtons();
4073
  addToolbars();
4074
 
@@ -4099,6 +4143,8 @@ define("tinymce/tableplugin/Plugin", [
4099
  }
4100
 
4101
  self.insertTable = insertTable;
 
 
4102
  }
4103
 
4104
  PluginManager.add('table', Plugin);
518
 
519
  // Set row/col span to start cell
520
  startCell = getCell(startX, startY).elm;
521
+ var colSpan = (endX - startX) + 1;
522
+ var rowSpan = (endY - startY) + 1;
523
+
524
+ // All cells in table selected then just make it a table with one cell
525
+ if (colSpan === gridWidth && rowSpan === grid.length) {
526
+ colSpan = 1;
527
+ rowSpan = 1;
528
+ }
529
+
530
+ // Multiple whole rows selected then just make it one rowSpan
531
+ if (colSpan === gridWidth && rowSpan > 1) {
532
+ rowSpan = 1;
533
+ }
534
+
535
+ setSpanVal(startCell, 'colSpan', colSpan);
536
+ setSpanVal(startCell, 'rowSpan', rowSpan);
537
 
538
  // Remove other cells and add it's contents to the start cell
539
  for (y = startY; y <= endY; y++) {
575
  }
576
 
577
  function insertRow(before) {
578
+ var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan, spanValue;
579
 
580
  // Find first/last row
581
  each(grid, function(row, y) {
602
  return;
603
  }
604
 
605
+ for (x = 0, spanValue = 0; x < grid[0].length; x += spanValue) {
606
  // Cell not found could be because of an invalid table structure
607
  if (!grid[posY][x]) {
608
  continue;
609
  }
610
 
611
  cell = grid[posY][x].elm;
612
+ spanValue = getSpanVal(cell, 'colspan');
613
 
614
  if (cell != lastCell) {
615
  if (!before) {
830
  function pasteRows(rows, before) {
831
  var selectedRows = getSelectedRows(),
832
  targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
833
+ targetCellCount = targetRow.cells.length,
834
+ newRows;
835
 
836
  // Nothing to paste
837
  if (!rows) {
838
  return;
839
  }
840
 
841
+ newRows = Tools.map(rows, function (row) {
842
+ return row.cloneNode(true);
843
+ });
844
+
845
  // Calc target cell count
846
  each(grid, function(row) {
847
  var match;
863
  });
864
 
865
  if (!before) {
866
+ newRows.reverse();
867
  }
868
 
869
+ each(newRows, function(row) {
870
  var i, cellCount = row.cells.length, cell;
871
 
872
  fireNewRow(row);
981
  maxX = endX;
982
  maxY = endY;
983
 
984
+ // This logic tried to expand the selection to always be a rectangle
985
  // Expand startX
986
+ /*for (y = startY; y <= maxY; y++) {
987
  cell = grid[y][startX];
988
 
989
  if (!cell.real) {
990
+ newX = startX - (cell.colspan - 1);
991
+ if (newX < startX && newX >= 0) {
992
+ startX = newX;
993
  }
994
  }
995
  }
999
  cell = grid[startY][x];
1000
 
1001
  if (!cell.real) {
1002
+ newY = startY - (cell.rowspan - 1);
1003
+ if (newY < startY && newY >= 0) {
1004
+ startY = newY;
1005
  }
1006
  }
1007
+ }*/
1008
 
1009
  // Find max X, Y
1010
  for (y = startY; y <= endY; y++) {
1530
  "tinymce/dom/TreeWalker",
1531
  "tinymce/util/Tools"
1532
  ], function(TableGrid, TreeWalker, Tools) {
1533
+ return function(editor, selectionChange) {
1534
  var dom = editor.dom, tableGrid, startCell, startTable, lastMouseOverTarget, hasCellSelection = true, resizing;
1535
 
1536
  function clear(force) {
1543
  }
1544
  }
1545
 
1546
+ var endSelection = function () {
1547
+ startCell = tableGrid = startTable = lastMouseOverTarget = null;
1548
+ selectionChange(false);
1549
+ };
1550
+
1551
  function isCellInTable(table, cell) {
1552
  if (!table || !cell) {
1553
  return false;
1582
  return;
1583
  }
1584
 
1585
+ selectionChange(true);
1586
+
1587
  if (isCellInTable(startTable, currentCell)) {
1588
  e.preventDefault();
1589
 
1698
  }
1699
 
1700
  editor.nodeChanged();
1701
+ endSelection();
1702
  }
1703
  });
1704
 
1705
  editor.on('KeyUp Drop SetContent', function(e) {
1706
  clear(e.type == 'setcontent');
1707
+ endSelection();
1708
  resizing = false;
1709
  });
1710
 
3454
  var initialTop = editor.dom.getPos(target).y;
3455
  editor.dom.setAttrib(target, RESIZE_BAR_ROW_DATA_INITIAL_TOP_ATTRIBUTE, initialTop);
3456
  setupRowDrag(target);
3457
+ } else {
3458
+ clearBars();
3459
  }
3460
  }
3461
 
3883
  self.quirks = new Quirks(editor);
3884
 
3885
  editor.on('Init', function() {
3886
+ self.cellSelection = new CellSelection(editor, function (selecting) {
3887
+ if (selecting) {
3888
+ resizeBars.clearBars();
3889
+ }
3890
+ });
3891
  self.resizeBars = resizeBars;
3892
  });
3893
 
4105
  );
4106
  }
4107
 
4108
+ function getClipboardRows() {
4109
+ return clipboardRows;
4110
+ }
4111
+
4112
+ function setClipboardRows(rows) {
4113
+ clipboardRows = rows;
4114
+ }
4115
+
4116
  addButtons();
4117
  addToolbars();
4118
 
4143
  }
4144
 
4145
  self.insertTable = insertTable;
4146
+ self.setClipboardRows = setClipboardRows;
4147
+ self.getClipboardRows = getClipboardRows;
4148
  }
4149
 
4150
  PluginManager.add('table', Plugin);
mce/table/plugin.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(a,b){"use strict";function c(a,b){for(var c,d=[],g=0;g<a.length;++g){if(c=f[a[g]]||e(a[g]),!c)throw"module definition dependecy not found: "+a[g];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){f[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}var f={};d("tinymce/tableplugin/Utils",["tinymce/Env"],function(a){function b(a,b){return parseInt(a.getAttribute(b)||1,10)}function c(b){(!a.ie||a.ie>9)&&(b.hasChildNodes()||(b.innerHTML='<br data-mce-bogus="1" />'))}return{getSpanVal:b,paddCell:c}}),d("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils"],function(a,c,d){var e=a.each,f=d.getSpanVal;return function(g,h,i){function j(){g.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function k(a){return a===g.getBody()}function l(b,c){return b?(c=a.map(c.split(","),function(a){return a.toLowerCase()}),a.grep(b.childNodes,function(b){return-1!==a.inArray(c,b.nodeName.toLowerCase())})):[]}function m(){var a=0;O=[],P=0,e(["thead","tbody","tfoot"],function(b){var c=l(h,b)[0],d=l(c,"tr");e(d,function(c,d){d+=a,e(l(c,"td,th"),function(a,c){var e,g,h,i;if(O[d])for(;O[d][c];)c++;for(h=f(a,"rowspan"),i=f(a,"colspan"),g=d;d+h>g;g++)for(O[g]||(O[g]=[]),e=c;c+i>e;e++)O[g][e]={part:b,real:g==d&&e==c,elm:a,rowspan:h,colspan:i};P=Math.max(P,c+1)})}),a+=d.length})}function n(a){return g.fire("newrow",{node:a}),a}function o(a){return g.fire("newcell",{node:a}),a}function p(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function q(a,b){var c;return c=O[b],c?c[a]:void 0}function r(a,b,c){a&&(c=parseInt(c,10),1===c?a.removeAttribute(b,1):a.setAttribute(b,c,1))}function s(a){return a&&(!!T.getAttrib(a.elm,"data-mce-selected")||a==i)}function t(){var a=[];return e(h.rows,function(b){e(b.cells,function(c){return T.getAttrib(c,"data-mce-selected")||i&&c==i.elm?(a.push(b),!1):void 0})}),a}function u(){var a=T.createRng();k(h)||(a.setStartAfter(h),a.setEndAfter(h),S.setRng(a),T.remove(h))}function v(b){var f,h={};return g.settings.table_clone_elements!==!1&&(h=a.makeMap((g.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),a.walk(b,function(a){var d;return 3==a.nodeType?(e(T.getParents(a.parentNode,null,b).reverse(),function(a){h[a.nodeName]&&(a=p(a,!1),f?d&&d.appendChild(a):f=d=a,d=a)}),d&&(d.innerHTML=c.ie&&c.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),b=p(b,!1),o(b),r(b,"rowSpan",1),r(b,"colSpan",1),f?b.appendChild(f):d.paddCell(b),b}function w(){var a,b=T.createRng();return e(T.select("tr",h),function(a){0===a.cells.length&&T.remove(a)}),0===T.select("tr",h).length?(b.setStartBefore(h),b.setEndBefore(h),S.setRng(b),void T.remove(h)):(e(T.select("thead,tbody,tfoot",h),function(a){0===a.rows.length&&T.remove(a)}),m(),void(Q&&(a=O[Math.min(O.length-1,Q.y)],a&&(S.select(a[Math.min(a.length-1,Q.x)].elm,!0),S.collapse(!0)))))}function x(a,b,c,d){var e,f,g,h,i;for(e=O[b][a].elm.parentNode,g=1;c>=g;g++)if(e=T.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=O[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)T.insertAfter(v(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(v(e.cells[0]),e.cells[0])}}function y(){e(O,function(a,b){e(a,function(a,c){var d,e,g;if(s(a)&&(a=a.elm,d=f(a,"colspan"),e=f(a,"rowspan"),d>1||e>1)){for(r(a,"rowSpan",1),r(a,"colSpan",1),g=0;d-1>g;g++)T.insertAfter(v(a),a);x(c,b,e-1,d)}})})}function z(b,c,d){var f,g,h,i,j,k,l,n,o,p,t;if(b?(f=J(b),g=f.x,h=f.y,i=g+(c-1),j=h+(d-1)):(Q=R=null,e(O,function(a,b){e(a,function(a,c){s(a)&&(Q||(Q={x:c,y:b}),R={x:c,y:b})})}),Q&&(g=Q.x,h=Q.y,i=R.x,j=R.y)),n=q(g,h),o=q(i,j),n&&o&&n.part==o.part){for(y(),m(),n=q(g,h).elm,r(n,"colSpan",i-g+1),r(n,"rowSpan",j-h+1),l=h;j>=l;l++)for(k=g;i>=k;k++)O[l]&&O[l][k]&&(b=O[l][k].elm,b!=n&&(p=a.grep(b.childNodes),e(p,function(a){n.appendChild(a)}),p.length&&(p=a.grep(n.childNodes),t=0,e(p,function(a){"BR"==a.nodeName&&t++<p.length-1&&n.removeChild(a)})),T.remove(b)));w()}}function A(a){var c,d,g,h,i,j,k,l,m;if(e(O,function(b,d){return e(b,function(b){return s(b)&&(b=b.elm,i=b.parentNode,j=n(p(i,!1)),c=d,a)?!1:void 0}),a?!c:void 0}),c!==b){for(h=0;h<O[0].length;h++)if(O[c][h]&&(d=O[c][h].elm,d!=g)){if(a){if(c>0&&O[c-1][h]&&(l=O[c-1][h].elm,m=f(l,"rowSpan"),m>1)){r(l,"rowSpan",m+1);continue}}else if(m=f(d,"rowspan"),m>1){r(d,"rowSpan",m+1);continue}k=v(d),r(k,"colSpan",d.colSpan),j.appendChild(k),g=d}j.hasChildNodes()&&(a?i.parentNode.insertBefore(j,i):T.insertAfter(j,i))}}function B(a){var b,c;e(O,function(c){return e(c,function(c,d){return s(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),e(O,function(d,e){var g,h,i;d[b]&&(g=d[b].elm,g!=c&&(i=f(g,"colspan"),h=f(g,"rowspan"),1==i?a?(g.parentNode.insertBefore(v(g),g),x(b,e,h-1,i)):(T.insertAfter(v(g),g),x(b,e,h-1,i)):r(g,"colSpan",g.colSpan+1),c=g))})}function C(b){return a.grep(D(b),s)}function D(a){var b=[];return e(a,function(a){e(a,function(a){b.push(a)})}),b}function E(){var b=[];if(k(h)){if(1==O[0].length)return;if(C(O).length==D(O).length)return}e(O,function(c){e(c,function(c,d){s(c)&&-1===a.inArray(b,d)&&(e(O,function(a){var b,c=a[d].elm;b=f(c,"colSpan"),b>1?r(c,"colSpan",b-1):T.remove(c)}),b.push(d))})}),w()}function F(){function a(a){var b,c;e(a.cells,function(a){var c=f(a,"rowSpan");c>1&&(r(a,"rowSpan",c-1),b=J(a),x(b.x,b.y,1,1))}),b=J(a.cells[0]),e(O[b.y],function(a){var b;a=a.elm,a!=c&&(b=f(a,"rowSpan"),1>=b?T.remove(a):r(a,"rowSpan",b-1),c=a)})}var b;b=t(),k(h)&&b.length==h.rows.length||(e(b.reverse(),function(b){a(b)}),w())}function G(){var a=t();if(!k(h)||a.length!=h.rows.length)return T.remove(a),w(),a}function H(){var a=t();return e(a,function(b,c){a[c]=p(b,!0)}),a}function I(a,b){var c=t(),d=c[b?0:c.length-1],f=d.cells.length;a&&(e(O,function(a){var b;return f=0,e(a,function(a){a.real&&(f+=a.colspan),a.elm.parentNode==d&&(b=1)}),b?!1:void 0}),b||a.reverse(),e(a,function(a){var c,e,g=a.cells.length;for(n(a),c=0;g>c;c++)e=a.cells[c],o(e),r(e,"colSpan",1),r(e,"rowSpan",1);for(c=g;f>c;c++)a.appendChild(o(v(a.cells[g-1])));for(c=f;g>c;c++)T.remove(a.cells[c]);b?d.parentNode.insertBefore(a,d):T.insertAfter(a,d)}),j())}function J(a){var b;return e(O,function(c,d){return e(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function K(a){Q=J(a)}function L(){var a,b;return a=b=0,e(O,function(c,d){e(c,function(c,e){var f,g;s(c)&&(c=O[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function M(a){var b,c,d,e,f,g,h,i,k,l;if(R=J(a),Q&&R){for(b=Math.min(Q.x,R.x),c=Math.min(Q.y,R.y),d=Math.max(Q.x,R.x),e=Math.max(Q.y,R.y),f=d,g=e,l=c;g>=l;l++)a=O[l][b],a.real||b-(a.colspan-1)<b&&(b-=a.colspan-1);for(k=b;f>=k;k++)a=O[c][k],a.real||c-(a.rowspan-1)<c&&(c-=a.rowspan-1);for(l=c;e>=l;l++)for(k=b;d>=k;k++)a=O[l][k],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&k+h>f&&(f=k+h),i&&l+i>g&&(g=l+i));for(j(),l=c;g>=l;l++)for(k=b;f>=k;k++)O[l][k]&&T.setAttrib(O[l][k].elm,"data-mce-selected","1")}}function N(a,b){var c,d,e;c=J(a),d=c.y*P+c.x;do{if(d+=b,e=q(d%P,Math.floor(d/P)),!e)break;if(e.elm!=a)return S.select(e.elm,!0),T.isEmpty(e.elm)&&S.collapse(!0),!0}while(e.elm==a);return!1}var O,P,Q,R,S=g.selection,T=S.dom;h=h||T.getParent(S.getStart(!0),"table"),m(),i=i||T.getParent(S.getStart(!0),"th,td"),i&&(Q=J(i),R=L(),i=q(Q.x,Q.y)),a.extend(this,{deleteTable:u,split:y,merge:z,insertRow:A,insertCol:B,deleteCols:E,deleteRows:F,cutRows:G,copyRows:H,pasteRows:I,getPos:J,setStartCell:K,setEndCell:M,moveRelIdx:N,refresh:m})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(-1===f){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){return c+=g(a,"colspan"),d=e,c>b?!1:void 0}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),d("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(a,b,c){return function(d){function e(a){d.getBody().style.webkitUserSelect="",(a||n)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),n=!1)}function f(a,b){return a&&b?a===m.getParent(b,"table"):!1}function g(b){var c,e,g=b.target;if(!l&&g!==k&&(k=g,j&&i)){if(e=m.getParent(g,"td,th"),f(j,e)||(e=m.getParent(j,"td,th")),i===e&&!n)return;if(f(j,e)){b.preventDefault(),h||(h=new a(d,j,i),d.getBody().style.webkitUserSelect="none"),h.setEndCell(e),n=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(o){}}}}var h,i,j,k,l,m=d.dom,n=!0;return d.on("SelectionChange",function(a){n&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||l||(e(),i=m.getParent(a.target,"td,th"),j=m.getParent(i,"table"))}),d.on("mouseover",g),d.on("remove",function(){m.unbind(d.getDoc(),"mouseover",g),e()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,l,n,o=d.selection;if(i){if(h&&(d.getBody().style.webkitUserSelect=""),f=m.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=m.createRng(),l=f[0],e.setStartBefore(l),e.setEndAfter(l),a(l,1),g=new b(l,m.getParent(f[0],"table"));do if("TD"==l.nodeName||"TH"==l.nodeName){if(!m.getAttrib(l,"data-mce-selected"))break;n=l}while(l=g.next());a(n),o.setRng(e)}d.nodeChanged(),i=h=j=k=null}}),d.on("KeyUp Drop SetContent",function(a){e("setcontent"==a.type),i=h=j=k=null,l=!1}),d.on("ObjectResizeStart ObjectResized",function(a){l="objectresized"!=a.type}),{clear:e}}}),d("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;return a?function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}:void 0}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e<a.children.length;e++)c(a.children[e],b,d)}var e;l(v,this),w=a.extend(w,this.toJSON()),w["class"]===!1&&delete w["class"],d.undoManager.transact(function(){if(p||(p=d.plugins.table.insertTable(w.cols||1,w.rows||1)),d.dom.setAttribs(p,{style:w.style,"class":w["class"]}),d.settings.table_style_by_css){if(u=[],u.push({name:"border",value:w.border}),u.push({name:"border-spacing",value:h(w.cellspacing)}),n(v,p,u),v.setAttribs(p,{"data-mce-border-color":w.borderColor,"data-mce-cell-padding":w.cellpadding,"data-mce-border":w.border}),p.children)for(var a=0;a<p.children.length;a++)c(p.children[a],"border",w.border),c(p.children[a],"padding",h(w.cellpadding))}else d.dom.setAttribs(p,{border:w.border,cellpadding:w.cellpadding,cellspacing:w.cellspacing});v.getAttrib(p,"width")&&!d.settings.table_style_by_css?v.setAttrib(p,"width",g(w.width)):v.setStyle(p,"width",h(w.width)),v.setStyle(p,"height",h(w.height)),e=v.select("caption",p)[0],e&&!w.caption&&v.remove(e),!e&&w.caption&&(e=v.create("caption"),e.innerHTML=b.ie?"\xa0":'<br data-mce-bogus="1"/>',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;d<c.length;d++){var e=v.getStyle(c[d],b);if("undefined"==typeof a&&(a=e),a!=e)return""}return a}var e,f=d.dom.select("td,th",a);return e=c(e,f)}var p,q,r,s,t,u,v=d.dom,w={};e===!0?(p=v.getParent(d.selection.getStart(),"table"),p&&(w={width:g(v.getStyle(p,"width")||v.getAttrib(p,"width")),height:g(v.getStyle(p,"height")||v.getAttrib(p,"height")),cellspacing:g(v.getStyle(p,"border-spacing")||v.getAttrib(p,"cellspacing")),cellpadding:v.getAttrib(p,"data-mce-cell-padding")||v.getAttrib(p,"cellpadding")||o(p,"padding"),border:v.getAttrib(p,"data-mce-border")||v.getAttrib(p,"border")||o(p,"border"),borderColor:v.getAttrib(p,"data-mce-border-color"),caption:!!v.select("caption",p)[0],"class":v.getAttrib(p,"class")},c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(w.align=a)}))):(q={label:"Cols",name:"cols"},r={label:"Rows",name:"rows"}),d.settings.table_class_list&&(w["class"]&&(w["class"]=w["class"].replace(/\s*mce\-item\-table\s*/g,"")),s={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"table",classes:[a.value]})})})}),t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:d.settings.table_appearance_options!==!1?[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},s]},d.settings.table_advtab!==!1?(m(v,w,p),d.windowManager.open({title:"Table properties",data:w,bodyType:"tabpanel",body:[{title:"General",type:"form",items:t},f(v)],onsubmit:j})):d.windowManager.open({title:"Table properties",data:w,body:t,onsubmit:j})},o.merge=function(a,b){d.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",value:"1",size:10},{label:"Rows",name:"rows",type:"textbox",value:"1",size:10}],onsubmit:function(){var c=this.toJSON();d.undoManager.transact(function(){a.merge(b,c.cols,c.rows)})}})},o.cell=function(){function b(){l(p,this),n=a.extend(n,this.toJSON()),d.undoManager.transact(function(){c(q,function(a){d.dom.setAttribs(a,{scope:n.scope,style:n.style,"class":n["class"]}),d.dom.setStyles(a,{width:h(n.width),height:h(n.height)}),n.type&&a.nodeName.toLowerCase()!=n.type&&(a=p.rename(a,n.type)),i(a),n.align&&d.formatter.apply("align"+n.align,{},a),j(a),n.valign&&d.formatter.apply("valign"+n.valign,{},a)}),d.focus()})}var e,n,o,p=d.dom,q=[];if(q=d.dom.select("td[data-mce-selected],th[data-mce-selected]"),e=d.dom.getParent(d.selection.getStart(),"td,th"),!q.length&&e&&q.push(e),e=e||q[0]){n={width:g(p.getStyle(e,"width")||p.getAttrib(e,"width")),height:g(p.getStyle(e,"height")||p.getAttrib(e,"height")),scope:p.getAttrib(e,"scope"),"class":p.getAttrib(e,"class")},n.type=e.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(e,"align"+a)&&(n.align=a)}),c("top middle bottom".split(" "),function(a){d.formatter.matchNode(e,"valign"+a)&&(n.valign=a)}),d.settings.table_cell_class_list&&(o={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_cell_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"td",classes:[a.value]})})})});var r={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},o]};d.settings.table_cell_advtab!==!1?(m(p,n,e),d.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:n,body:[{title:"General",type:"form",items:r},f(p)],onsubmit:b})):d.windowManager.open({title:"Cell properties",data:n,body:r,onsubmit:b})}},o.row=function(){function b(){var b,e,f;l(r,this),p=a.extend(p,this.toJSON()),d.undoManager.transact(function(){var a=p.type;c(s,function(c){d.dom.setAttribs(c,{scope:p.scope,style:p.style,"class":p["class"]}),d.dom.setStyles(c,{height:h(p.height)}),a!=c.parentNode.nodeName.toLowerCase()&&(b=r.getParent(c,"table"),e=c.parentNode,f=r.select(a,b)[0],f||(f=r.create(a),b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)),f.appendChild(c),e.hasChildNodes()||r.remove(e)),i(c),p.align&&d.formatter.apply("align"+p.align,{},c)}),d.focus()})}var e,j,n,o,p,q,r=d.dom,s=[];e=d.dom.getParent(d.selection.getStart(),"table"),j=d.dom.getParent(d.selection.getStart(),"td,th"),c(e.rows,function(a){c(a.cells,function(b){return r.getAttrib(b,"data-mce-selected")||b==j?(s.push(a),!1):void 0})}),n=s[0],n&&(p={height:g(r.getStyle(n,"height")||r.getAttrib(n,"height")),scope:r.getAttrib(n,"scope"),"class":r.getAttrib(n,"class")},p.type=n.parentNode.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(n,"align"+a)&&(p.align=a)}),d.settings.table_row_class_list&&(o={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_row_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"tr",classes:[a.value]})})})}),q={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"None",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},o]},d.settings.table_row_advtab!==!1?(m(r,p,n),d.windowManager.open({title:"Row properties",data:p,bodyType:"tabpanel",body:[{title:"General",type:"form",items:q},f(r)],onsubmit:b})):d.windowManager.open({title:"Row properties",data:p,body:q,onsubmit:b}))}}}),d("tinymce/tableplugin/ResizeBars",["tinymce/util/Tools","tinymce/util/VK"],function(a,c){var d;return function(e){function f(a,b){return{index:a,y:e.dom.getPos(b).y}}function g(a,b){return{index:a,y:e.dom.getPos(b).y+b.offsetHeight}}function h(a,b){return{index:a,x:e.dom.getPos(b).x}}function i(a,b){return{index:a,x:e.dom.getPos(b).x+b.offsetWidth}}function j(){var a=e.getBody().dir;return"rtl"===a}function k(){return e.inline}function l(){return k?e.getBody().ownerDocument.body:e.getBody()}function m(a,b){return j()?i(a,b):h(a,b)}function n(a,b){return j()?h(a,b):i(a,b)}function o(a,b){return p(a,"width")/p(b,"width")*100}function p(a,b){var c=e.dom.getStyle(a,b,!0),d=parseInt(c,10);return d}function q(a){var b=p(a,"width"),c=p(a.parentElement,"width");return b/c*100}function r(a,b){var c=p(a,"width");return b/c*100}function s(a,b){var c=p(a.parentElement,"width");return b/c*100}function t(a,b,c){for(var d=[],e=1;e<c.length;e++){var f=c[e].element;d.push(a(e-1,f))}var g=c[c.length-1];return d.push(b(c.length-1,g.element)),d}function u(){var b=e.dom.select("."+ma,l());a.each(b,function(a){e.dom.remove(a)})}function v(a){u(),F(a)}function w(a,b,c,d,e,f,g,h){var i={"data-mce-bogus":"all","class":ma+" "+a,unselectable:"on","data-mce-resize":!1,style:"cursor: "+b+"; margin: 0; padding: 0; position: absolute; left: "+c+"px; top: "+d+"px; height: "+e+"px; width: "+f+"px; "};return i[g]=h,i}function x(b,c,d){a.each(b,function(a){var b=d.x,f=a.y-va/2,g=va,h=c;e.dom.add(l(),"div",w(na,oa,b,f,g,h,pa,a.index))})}function y(b,c,d){a.each(b,function(a){var b=a.x-va/2,f=d.y,g=c,h=va;e.dom.add(l(),"div",w(ra,sa,b,f,g,h,ta,a.index))})}function z(b){return a.map(b.rows,function(b){var c=a.map(b.cells,function(a){var b=a.hasAttribute("rowspan")?parseInt(a.getAttribute("rowspan"),10):1,c=a.hasAttribute("colspan")?parseInt(a.getAttribute("colspan"),10):1;return{element:a,rowspan:b,colspan:c}});return{element:b,cells:c}})}function A(c){function d(a,b){return a+","+b}function e(a,b){return h[d(a,b)]}function f(){var b=[];return a.each(i,function(a){b=b.concat(a.cells)}),b}function g(){return i}var h={},i=[],j=0,k=0;return a.each(c,function(c,e){var f=[];a.each(c.cells,function(a){for(var c=0;h[d(e,c)]!==b;)c++;for(var g={element:a.element,colspan:a.colspan,rowspan:a.rowspan,rowIndex:e,colIndex:c},i=0;i<a.colspan;i++)for(var l=0;l<a.rowspan;l++){var m=e+l,n=c+i;h[d(m,n)]=g,j=Math.max(j,m+1),k=Math.max(k,n+1)}f.push(g)}),i.push({element:c.element,cells:f})}),{grid:{maxRows:j,maxCols:k},getAt:e,getAllCells:f,getAllRows:g}}function B(a,b){for(var c=[],d=a;b>d;d++)c.push(d);return c}function C(a,b,c){for(var d,e=a(),f=0;f<e.length;f++)b(e[f])&&(d=e[f]);return d?d:c()}function D(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(c,function(a){function c(){for(var c=[],e=0;e<d.length;e++){var f=b.getAt(e,a);f&&f.colIndex===a&&c.push(f)}return c}function e(a){return 1===a.colspan}function f(){for(var c,e=0;e<d.length;e++)if(c=b.getAt(e,a))return c;return null}return C(c,e,f)})}function E(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(d,function(a){function d(){for(var d=[],e=0;e<c.length;e++){var f=b.getAt(a,e);f&&f.rowIndex===a&&d.push(f)}return d}function e(a){return 1===a.rowspan}function f(){return b.getAt(a,0)}return C(d,e,f)})}function F(a){var b=z(a),c=A(b),d=E(c),h=D(c),i=e.dom.getPos(a),j=d.length>0?t(f,g,d):[],k=h.length>0?t(m,n,h):[];x(j,a.offsetWidth,i),y(k,a.offsetHeight,i)}function G(a,b,c,d){if(0>b||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g<f.length;g++)f[g]&&(e={value:f[g],delta:g+1});var h=a[b+1];if(h)h={value:h,delta:1};else for(var i=a.slice(b+1),j=0;j<i.length;j++)i[j]&&(h={value:i[j],delta:j+1});var k=h.delta-e.delta,l=Math.abs(h.value-e.value)/k;return c?l/p(d,"width")*100:l}function H(a,b){var c=e.dom.getStyle(a,b);return c||(c=e.dom.getAttrib(a,b)),c||(c=e.dom.getStyle(a,b,!0)),c}function I(a,b,c){var d=H(a,"width"),e=parseInt(d,10),f=b?o(a,c):p(a,"width");return(b&&!R(d)||!b&&!S(d))&&(e=0),!isNaN(e)&&e>0?e:f}function J(b,c,d){for(var e=D(b),f=a.map(e,function(a){return m(a.colIndex,a.element).x}),g=[],h=0;h<e.length;h++){var i=e[h].element.hasAttribute("colspan")?parseInt(e[h].element.getAttribute("colspan"),10):1,j=i>1?G(f,h):I(e[h].element,c,d);j=j?j:wa,g.push(j)}return g}function K(a){var b=H(a,"height"),c=parseInt(b,10);return R(b)&&(c=0),!isNaN(c)&&c>0?c:p(a,"height")}function L(b){for(var c=E(b),d=a.map(c,function(a){return f(a.rowIndex,a.element).y}),e=[],g=0;g<c.length;g++){var h=c[g].element.hasAttribute("rowspan")?parseInt(c[g].element.getAttribute("rowspan"),10):1,i=h>1?G(d,g):K(c[g].element);i=i?i:xa,e.push(i)}return e}function M(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&c<b.length-1?i(c,c+1):c===b.length-1?j(c-1,c):[]}function N(a,b,c){for(var d=0,e=a;b>e;e++)d+=c[e];return d}function O(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.colIndex,a.colIndex+a.colspan,c);return{element:a.element,width:b,colspan:a.colspan}})}function P(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.rowIndex,a.rowIndex+a.rowspan,c);return{element:a.element,height:b,rowspan:a.rowspan}})}function Q(b,c){var d=b.getAllRows();return a.map(d,function(a,b){return{element:a.element,height:c[b]}})}function R(a){return za.test(a)}function S(a){return Aa.test(a)}function T(b,c,d){function f(b,c){a.each(b,function(a){e.dom.setStyle(a.element,"width",a.width+c),e.dom.setAttrib(a.element,"width",null)})}function g(){return d<k.grid.maxCols-1?q(b):q(b)+s(b,c)}function h(){return d<k.grid.maxCols-1?p(b,"width"):p(b,"width")+c}function i(a,c,f){d!=k.grid.maxCols-1&&f||(e.dom.setStyle(b,"width",a+c),e.dom.setAttrib(b,"width",null))}for(var j=z(b),k=A(j),l=R(b.width)||R(b.style.width),m=J(k,l,b),n=l?r(b,c):c,o=M(m,d,n,wa,l,b),t=[],u=0;u<o.length;u++)t.push(o[u]+m[u]);var v=O(k,t),w=l?"%":"px",x=l?g():h();e.undoManager.transact(function(){f(v,w),i(x,w,l)})}function U(b,c,d){for(var f=z(b),g=A(f),h=L(g),i=[],j=0,k=0;k<h.length;k++)i.push(k===d?c+h[k]:h[k]),j+=j[k];var l=P(g,i),m=Q(g,i);e.undoManager.transact(function(){a.each(m,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),a.each(l,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),e.dom.setStyle(b,"height",j+"px"),e.dom.setAttrib(b,"height",null)})}function V(){ga=setTimeout(function(){Z()},200)}function W(){clearTimeout(ga)}function X(){var a=document.createElement("div");return a.setAttribute("style","margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; height: 100%; width: 100%;"),a.setAttribute("data-mce-bogus","all"),a}function Y(a,b){e.dom.bind(a,"mouseup",function(){Z()}),e.dom.bind(a,"mousemove",function(a){
2
- W(),ha&&b(a)}),e.dom.bind(a,"mouseout",function(){V()})}function Z(){if(e.dom.remove(ia),ha){e.dom.removeClass(ja,ya),ha=!1;var a,b;if(_(ja)){var c=parseInt(e.dom.getAttrib(ja,ua),10),f=e.dom.getPos(ja).x;a=parseInt(e.dom.getAttrib(ja,ta),10),b=j()?c-f:f-c,T(d,b,a)}else if(aa(ja)){var g=parseInt(e.dom.getAttrib(ja,qa),10),h=e.dom.getPos(ja).y;a=parseInt(e.dom.getAttrib(ja,pa),10),b=h-g,U(d,b,a)}v(d),e.nodeChanged()}}function $(a,b){ia=ia?ia:X(),ha=!0,e.dom.addClass(a,ya),ja=a,Y(ia,b),e.dom.add(l(),ia)}function _(a){return e.dom.hasClass(a,ra)}function aa(a){return e.dom.hasClass(a,na)}function ba(a){ka=ka!==b?ka:a.clientX;var c=a.clientX-ka;ka=a.clientX;var d=e.dom.getPos(ja).x;e.dom.setStyle(ja,"left",d+c+"px")}function ca(a){la=la!==b?la:a.clientY;var c=a.clientY-la;la=a.clientY;var d=e.dom.getPos(ja).y;e.dom.setStyle(ja,"top",d+c+"px")}function da(a){ka=b,$(a,ba)}function ea(a){la=b,$(a,ca)}function fa(a){var b=a.target,c=e.getBody();if(e.$.contains(c,d)||d===c)if(_(b)){a.preventDefault();var f=e.dom.getPos(b).x;e.dom.setAttrib(b,ua,f),da(b)}else if(aa(b)){a.preventDefault();var g=e.dom.getPos(b).y;e.dom.setAttrib(b,qa,g),ea(b)}}var ga,ha,ia,ja,ka,la,ma="mce-resize-bar",na="mce-resize-bar-row",oa="row-resize",pa="data-row",qa="data-initial-top",ra="mce-resize-bar-col",sa="col-resize",ta="data-col",ua="data-initial-left",va=4,wa=10,xa=10,ya="mce-resize-bar-dragging",za=new RegExp(/(\d+(\.\d+)?%)/),Aa=new RegExp(/px|em/);return e.on("init",function(){e.dom.bind(l(),"mousedown",fa)}),e.on("ObjectResized",function(b){var c=b.target;if("TABLE"===c.nodeName){var d=[];a.each(c.rows,function(b){a.each(b.cells,function(a){var b=e.dom.getStyle(a,"width",!0);d.push({cell:a,width:b})})}),a.each(d,function(a){e.dom.setStyle(a.cell,"width",a.width),e.dom.setAttrib(a.cell,"width",null)})}}),e.on("mouseover",function(a){if(!ha){var b=e.dom.getParent(a.target,"table");("TABLE"===a.target.nodeName||b)&&(d=b,v(b))}}),e.on("keydown",function(a){switch(a.keyCode){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:u()}}),e.on("remove",function(){u(),e.dom.unbind(l(),"mousedown",fa)}),{adjustWidth:T,adjustHeight:U,clearBars:u,drawBars:F,determineDeltas:M,getTableGrid:A,getTableDetails:z,getWidths:J,getPixelHeights:L,isPercentageBasedSize:R,isPixelBasedSize:S,recalculateWidths:O,recalculateCellHeights:P,recalculateRowHeights:Q}}}),d("tinymce/tableplugin/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/tableplugin/ResizeBars","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(a,b,c,d,e,f,g,h,i){function j(f){function g(a){return function(){f.execCommand(a)}}function i(a,b){var c,d,e,g;for(e='<table id="__mce"><tbody>',c=0;b>c;c++){for(e+="<tr>",d=0;a>d;d++)e+="<td>"+(h.ie&&h.ie<10?"&nbsp;":"<br>")+"</td>";e+="</tr>"}return e+="</tbody></table>",f.undoManager.transact(function(){f.insertContent(e),g=f.dom.get("__mce"),f.dom.setAttrib(g,"id",null),f.$("tr",g).each(function(a,b){f.fire("newrow",{node:b}),f.$("th,td",b).each(function(a,b){f.fire("newcell",{node:b})})}),f.dom.setAttribs(g,f.settings.table_default_attributes||{}),f.dom.setStyles(g,f.settings.table_default_styles||{})}),g}function j(a,b,c){function d(){var d,e,g,h={},i=0;e=f.dom.select("td[data-mce-selected],th[data-mce-selected]"),d=e[0],d||(d=f.selection.getStart()),c&&e.length>0?(k(e,function(a){return h[a.parentNode.parentNode.nodeName]=1}),k(h,function(a){i+=a}),g=1!==i):g=!f.dom.getParent(d,b),a.disabled(g),f.selection.selectorChanged(b,function(b){a.disabled(!b)})}f.initialized?d():f.on("init",d)}function l(){j(this,"table")}function m(){j(this,"td,th")}function n(){j(this,"td,th",!0)}function o(){var a="";a='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var b=0;10>b;b++){a+="<tr>";for(var c=0;10>c;c++)a+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*b+c)+'" href="#" data-mce-x="'+c+'" data-mce-y="'+b+'"></a></td>';a+="</tr>"}return a+="</table>",a+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function p(a,b,c){var d,e,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),e=0;10>e;e++)for(d=0;10>d;d++)h=j.rows[e].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=e,f.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function q(){f.addButton("tableprops",{title:"Table properties",onclick:w.tableProps,icon:"table"}),f.addButton("tabledelete",{title:"Delete table",onclick:g("mceTableDelete")}),f.addButton("tablecellprops",{title:"Cell properties",onclick:g("mceTableCellProps")}),f.addButton("tablemergecells",{title:"Merge cells",onclick:g("mceTableMergeCells")}),f.addButton("tablesplitcells",{title:"Split cell",onclick:g("mceTableSplitCells")}),f.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:g("mceTableInsertRowBefore")}),f.addButton("tableinsertrowafter",{title:"Insert row after",onclick:g("mceTableInsertRowAfter")}),f.addButton("tabledeleterow",{title:"Delete row",onclick:g("mceTableDeleteRow")}),f.addButton("tablerowprops",{title:"Row properties",onclick:g("mceTableRowProps")}),f.addButton("tablecutrow",{title:"Cut row",onclick:g("mceTableCutRow")}),f.addButton("tablecopyrow",{title:"Copy row",onclick:g("mceTableCopyRow")}),f.addButton("tablepasterowbefore",{title:"Paste row before",onclick:g("mceTablePasteRowBefore")}),f.addButton("tablepasterowafter",{title:"Paste row after",onclick:g("mceTablePasteRowAfter")}),f.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:g("mceTableInsertColBefore")}),f.addButton("tableinsertcolafter",{title:"Insert column after",onclick:g("mceTableInsertColAfter")}),f.addButton("tabledeletecol",{title:"Delete column",onclick:g("mceTableDeleteCol")})}function r(a){var b=f.dom.is(a,"table")&&f.getBody().contains(a);return b}function s(){var a=f.settings.table_toolbar;""!==a&&a!==!1&&(a||(a="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),f.addContextToolbar(r,a))}var t,u,v=this,w=new d(f);!f.settings.object_resizing||f.settings.table_resize_bars===!1||f.settings.object_resizing!==!0&&"table"!==f.settings.object_resizing||(u=e(f)),f.settings.table_grid===!1?f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:w.table}):f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),w.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");f.dom.removeClass(a,"mce-active"),f.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:o(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(p(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),f.undoManager.transact(function(){i(b.lastX+1,b.lastY+1)}),f.addVisual())}}]}),f.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:l,onclick:w.tableProps}),f.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"}),f.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:m},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:n},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:m}]}),f.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:m},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:m},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:m},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:m},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:m},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:m},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:m},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:m}]}),f.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:m},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:m},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:m}]});var x=[];k("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?x.push({text:"-"}):x.push(f.menuItems[a])}),f.addButton("table",{type:"menubutton",title:"Table",menu:x}),h.isIE||f.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(f.selection.select(a),f.nodeChanged())}),v.quirks=new b(f),f.on("Init",function(){v.cellSelection=new c(f),v.resizeBars=u}),f.on("PreInit",function(){f.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),k({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=f.dom.getParent(f.selection.getStart(),"th,td"),f.dom.select("td[data-mce-selected],th[data-mce-selected]").length?a.merge():w.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRow(!0)},mceTableInsertRowAfter:function(a){a.insertRow()},mceTableInsertColBefore:function(a){a.insertCol(!0)},mceTableInsertColAfter:function(a){a.insertCol()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){t=a.cutRows()},mceTableCopyRow:function(a){t=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(t,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(t)},mceTableDelete:function(a){u&&u.clearBars(),a.deleteTable()}},function(b,c){f.addCommand(c,function(){var c=new a(f);c&&(b(c),f.execCommand("mceRepaint"),v.cellSelection.clear())})}),k({mceInsertTable:w.table,mceTableProps:function(){w.table(!0)},mceTableRowProps:w.row,mceTableCellProps:w.cell},function(a,b){f.addCommand(b,function(b,c){a(c)})}),q(),s(),f.settings.table_tab_navigation!==!1&&f.on("keydown",function(b){var c,d,e;9==b.keyCode&&(c=f.dom.getParent(f.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(f),e=b.shiftKey?-1:1,f.undoManager.transact(function(){!d.moveRelIdx(c,e)&&e>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,e))})))}),v.insertTable=i}var k=f.each;i.add("table",j)})}(this);
1
+ !function(a,b){"use strict";function c(a,b){for(var c,d=[],g=0;g<a.length;++g){if(c=f[a[g]]||e(a[g]),!c)throw"module definition dependecy not found: "+a[g];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){f[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}var f={};d("tinymce/tableplugin/Utils",["tinymce/Env"],function(a){function b(a,b){return parseInt(a.getAttribute(b)||1,10)}function c(b){(!a.ie||a.ie>9)&&(b.hasChildNodes()||(b.innerHTML='<br data-mce-bogus="1" />'))}return{getSpanVal:b,paddCell:c}}),d("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils"],function(a,c,d){var e=a.each,f=d.getSpanVal;return function(g,h,i){function j(){g.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function k(a){return a===g.getBody()}function l(b,c){return b?(c=a.map(c.split(","),function(a){return a.toLowerCase()}),a.grep(b.childNodes,function(b){return-1!==a.inArray(c,b.nodeName.toLowerCase())})):[]}function m(){var a=0;O=[],P=0,e(["thead","tbody","tfoot"],function(b){var c=l(h,b)[0],d=l(c,"tr");e(d,function(c,d){d+=a,e(l(c,"td,th"),function(a,c){var e,g,h,i;if(O[d])for(;O[d][c];)c++;for(h=f(a,"rowspan"),i=f(a,"colspan"),g=d;d+h>g;g++)for(O[g]||(O[g]=[]),e=c;c+i>e;e++)O[g][e]={part:b,real:g==d&&e==c,elm:a,rowspan:h,colspan:i};P=Math.max(P,c+1)})}),a+=d.length})}function n(a){return g.fire("newrow",{node:a}),a}function o(a){return g.fire("newcell",{node:a}),a}function p(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function q(a,b){var c;return c=O[b],c?c[a]:void 0}function r(a,b,c){a&&(c=parseInt(c,10),1===c?a.removeAttribute(b,1):a.setAttribute(b,c,1))}function s(a){return a&&(!!T.getAttrib(a.elm,"data-mce-selected")||a==i)}function t(){var a=[];return e(h.rows,function(b){e(b.cells,function(c){return T.getAttrib(c,"data-mce-selected")||i&&c==i.elm?(a.push(b),!1):void 0})}),a}function u(){var a=T.createRng();k(h)||(a.setStartAfter(h),a.setEndAfter(h),S.setRng(a),T.remove(h))}function v(b){var f,h={};return g.settings.table_clone_elements!==!1&&(h=a.makeMap((g.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),a.walk(b,function(a){var d;return 3==a.nodeType?(e(T.getParents(a.parentNode,null,b).reverse(),function(a){h[a.nodeName]&&(a=p(a,!1),f?d&&d.appendChild(a):f=d=a,d=a)}),d&&(d.innerHTML=c.ie&&c.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),b=p(b,!1),o(b),r(b,"rowSpan",1),r(b,"colSpan",1),f?b.appendChild(f):d.paddCell(b),b}function w(){var a,b=T.createRng();return e(T.select("tr",h),function(a){0===a.cells.length&&T.remove(a)}),0===T.select("tr",h).length?(b.setStartBefore(h),b.setEndBefore(h),S.setRng(b),void T.remove(h)):(e(T.select("thead,tbody,tfoot",h),function(a){0===a.rows.length&&T.remove(a)}),m(),void(Q&&(a=O[Math.min(O.length-1,Q.y)],a&&(S.select(a[Math.min(a.length-1,Q.x)].elm,!0),S.collapse(!0)))))}function x(a,b,c,d){var e,f,g,h,i;for(e=O[b][a].elm.parentNode,g=1;c>=g;g++)if(e=T.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=O[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)T.insertAfter(v(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(v(e.cells[0]),e.cells[0])}}function y(){e(O,function(a,b){e(a,function(a,c){var d,e,g;if(s(a)&&(a=a.elm,d=f(a,"colspan"),e=f(a,"rowspan"),d>1||e>1)){for(r(a,"rowSpan",1),r(a,"colSpan",1),g=0;d-1>g;g++)T.insertAfter(v(a),a);x(c,b,e-1,d)}})})}function z(b,c,d){var f,g,h,i,j,k,l,n,o,p,t;if(b?(f=J(b),g=f.x,h=f.y,i=g+(c-1),j=h+(d-1)):(Q=R=null,e(O,function(a,b){e(a,function(a,c){s(a)&&(Q||(Q={x:c,y:b}),R={x:c,y:b})})}),Q&&(g=Q.x,h=Q.y,i=R.x,j=R.y)),n=q(g,h),o=q(i,j),n&&o&&n.part==o.part){y(),m(),n=q(g,h).elm;var u=i-g+1,v=j-h+1;for(u===P&&v===O.length&&(u=1,v=1),u===P&&v>1&&(v=1),r(n,"colSpan",u),r(n,"rowSpan",v),l=h;j>=l;l++)for(k=g;i>=k;k++)O[l]&&O[l][k]&&(b=O[l][k].elm,b!=n&&(p=a.grep(b.childNodes),e(p,function(a){n.appendChild(a)}),p.length&&(p=a.grep(n.childNodes),t=0,e(p,function(a){"BR"==a.nodeName&&t++<p.length-1&&n.removeChild(a)})),T.remove(b)));w()}}function A(a){var c,d,g,h,i,j,k,l,m,o;if(e(O,function(b,d){return e(b,function(b){return s(b)&&(b=b.elm,i=b.parentNode,j=n(p(i,!1)),c=d,a)?!1:void 0}),a?!c:void 0}),c!==b){for(h=0,o=0;h<O[0].length;h+=o)if(O[c][h]&&(d=O[c][h].elm,o=f(d,"colspan"),d!=g)){if(a){if(c>0&&O[c-1][h]&&(l=O[c-1][h].elm,m=f(l,"rowSpan"),m>1)){r(l,"rowSpan",m+1);continue}}else if(m=f(d,"rowspan"),m>1){r(d,"rowSpan",m+1);continue}k=v(d),r(k,"colSpan",d.colSpan),j.appendChild(k),g=d}j.hasChildNodes()&&(a?i.parentNode.insertBefore(j,i):T.insertAfter(j,i))}}function B(a){var b,c;e(O,function(c){return e(c,function(c,d){return s(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),e(O,function(d,e){var g,h,i;d[b]&&(g=d[b].elm,g!=c&&(i=f(g,"colspan"),h=f(g,"rowspan"),1==i?a?(g.parentNode.insertBefore(v(g),g),x(b,e,h-1,i)):(T.insertAfter(v(g),g),x(b,e,h-1,i)):r(g,"colSpan",g.colSpan+1),c=g))})}function C(b){return a.grep(D(b),s)}function D(a){var b=[];return e(a,function(a){e(a,function(a){b.push(a)})}),b}function E(){var b=[];if(k(h)){if(1==O[0].length)return;if(C(O).length==D(O).length)return}e(O,function(c){e(c,function(c,d){s(c)&&-1===a.inArray(b,d)&&(e(O,function(a){var b,c=a[d].elm;b=f(c,"colSpan"),b>1?r(c,"colSpan",b-1):T.remove(c)}),b.push(d))})}),w()}function F(){function a(a){var b,c;e(a.cells,function(a){var c=f(a,"rowSpan");c>1&&(r(a,"rowSpan",c-1),b=J(a),x(b.x,b.y,1,1))}),b=J(a.cells[0]),e(O[b.y],function(a){var b;a=a.elm,a!=c&&(b=f(a,"rowSpan"),1>=b?T.remove(a):r(a,"rowSpan",b-1),c=a)})}var b;b=t(),k(h)&&b.length==h.rows.length||(e(b.reverse(),function(b){a(b)}),w())}function G(){var a=t();if(!k(h)||a.length!=h.rows.length)return T.remove(a),w(),a}function H(){var a=t();return e(a,function(b,c){a[c]=p(b,!0)}),a}function I(b,c){var d,f=t(),g=f[c?0:f.length-1],h=g.cells.length;b&&(d=a.map(b,function(a){return a.cloneNode(!0)}),e(O,function(a){var b;return h=0,e(a,function(a){a.real&&(h+=a.colspan),a.elm.parentNode==g&&(b=1)}),b?!1:void 0}),c||d.reverse(),e(d,function(a){var b,d,e=a.cells.length;for(n(a),b=0;e>b;b++)d=a.cells[b],o(d),r(d,"colSpan",1),r(d,"rowSpan",1);for(b=e;h>b;b++)a.appendChild(o(v(a.cells[e-1])));for(b=h;e>b;b++)T.remove(a.cells[b]);c?g.parentNode.insertBefore(a,g):T.insertAfter(a,g)}),j())}function J(a){var b;return e(O,function(c,d){return e(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function K(a){Q=J(a)}function L(){var a,b;return a=b=0,e(O,function(c,d){e(c,function(c,e){var f,g;s(c)&&(c=O[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function M(a){var b,c,d,e,f,g,h,i,k,l;if(R=J(a),Q&&R){for(b=Math.min(Q.x,R.x),c=Math.min(Q.y,R.y),d=Math.max(Q.x,R.x),e=Math.max(Q.y,R.y),f=d,g=e,l=c;e>=l;l++)for(k=b;d>=k;k++)a=O[l][k],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&k+h>f&&(f=k+h),i&&l+i>g&&(g=l+i));for(j(),l=c;g>=l;l++)for(k=b;f>=k;k++)O[l][k]&&T.setAttrib(O[l][k].elm,"data-mce-selected","1")}}function N(a,b){var c,d,e;c=J(a),d=c.y*P+c.x;do{if(d+=b,e=q(d%P,Math.floor(d/P)),!e)break;if(e.elm!=a)return S.select(e.elm,!0),T.isEmpty(e.elm)&&S.collapse(!0),!0}while(e.elm==a);return!1}var O,P,Q,R,S=g.selection,T=S.dom;h=h||T.getParent(S.getStart(!0),"table"),m(),i=i||T.getParent(S.getStart(!0),"th,td"),i&&(Q=J(i),R=L(),i=q(Q.x,Q.y)),a.extend(this,{deleteTable:u,split:y,merge:z,insertRow:A,insertCol:B,deleteCols:E,deleteRows:F,cutRows:G,copyRows:H,pasteRows:I,getPos:J,setStartCell:K,setEndCell:M,moveRelIdx:N,refresh:m})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(-1===f){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){return c+=g(a,"colspan"),d=e,c>b?!1:void 0}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?"&nbsp;":'<br data-mce-bogus="1" />'):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),d("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(a,b,c){return function(d,e){function f(a){d.getBody().style.webkitUserSelect="",(a||o)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),o=!1)}function g(a,b){return a&&b?a===n.getParent(b,"table"):!1}function h(b){var c,f,h=b.target;if(!m&&h!==l&&(l=h,k&&j)){if(f=n.getParent(h,"td,th"),g(k,f)||(f=n.getParent(k,"td,th")),j===f&&!o)return;if(e(!0),g(k,f)){b.preventDefault(),i||(i=new a(d,k,j),d.getBody().style.webkitUserSelect="none"),i.setEndCell(f),o=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(p){}}}}var i,j,k,l,m,n=d.dom,o=!0,p=function(){j=i=k=l=null,e(!1)};return d.on("SelectionChange",function(a){o&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||m||(f(),j=n.getParent(a.target,"td,th"),k=n.getParent(j,"table"))}),d.on("mouseover",h),d.on("remove",function(){n.unbind(d.getDoc(),"mouseover",h),f()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,h,k,l=d.selection;if(j){if(i&&(d.getBody().style.webkitUserSelect=""),f=n.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=n.createRng(),h=f[0],e.setStartBefore(h),e.setEndAfter(h),a(h,1),g=new b(h,n.getParent(f[0],"table"));do if("TD"==h.nodeName||"TH"==h.nodeName){if(!n.getAttrib(h,"data-mce-selected"))break;k=h}while(h=g.next());a(k),l.setRng(e)}d.nodeChanged(),p()}}),d.on("KeyUp Drop SetContent",function(a){f("setcontent"==a.type),p(),m=!1}),d.on("ObjectResizeStart ObjectResized",function(a){m="objectresized"!=a.type}),{clear:f}}}),d("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;return a?function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}:void 0}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e<a.children.length;e++)c(a.children[e],b,d)}var e;l(v,this),w=a.extend(w,this.toJSON()),w["class"]===!1&&delete w["class"],d.undoManager.transact(function(){if(p||(p=d.plugins.table.insertTable(w.cols||1,w.rows||1)),d.dom.setAttribs(p,{style:w.style,"class":w["class"]}),d.settings.table_style_by_css){if(u=[],u.push({name:"border",value:w.border}),u.push({name:"border-spacing",value:h(w.cellspacing)}),n(v,p,u),v.setAttribs(p,{"data-mce-border-color":w.borderColor,"data-mce-cell-padding":w.cellpadding,"data-mce-border":w.border}),p.children)for(var a=0;a<p.children.length;a++)c(p.children[a],"border",w.border),c(p.children[a],"padding",h(w.cellpadding))}else d.dom.setAttribs(p,{border:w.border,cellpadding:w.cellpadding,cellspacing:w.cellspacing});v.getAttrib(p,"width")&&!d.settings.table_style_by_css?v.setAttrib(p,"width",g(w.width)):v.setStyle(p,"width",h(w.width)),v.setStyle(p,"height",h(w.height)),e=v.select("caption",p)[0],e&&!w.caption&&v.remove(e),!e&&w.caption&&(e=v.create("caption"),e.innerHTML=b.ie?"\xa0":'<br data-mce-bogus="1"/>',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;d<c.length;d++){var e=v.getStyle(c[d],b);if("undefined"==typeof a&&(a=e),a!=e)return""}return a}var e,f=d.dom.select("td,th",a);return e=c(e,f)}var p,q,r,s,t,u,v=d.dom,w={};e===!0?(p=v.getParent(d.selection.getStart(),"table"),p&&(w={width:g(v.getStyle(p,"width")||v.getAttrib(p,"width")),height:g(v.getStyle(p,"height")||v.getAttrib(p,"height")),cellspacing:g(v.getStyle(p,"border-spacing")||v.getAttrib(p,"cellspacing")),cellpadding:v.getAttrib(p,"data-mce-cell-padding")||v.getAttrib(p,"cellpadding")||o(p,"padding"),border:v.getAttrib(p,"data-mce-border")||v.getAttrib(p,"border")||o(p,"border"),borderColor:v.getAttrib(p,"data-mce-border-color"),caption:!!v.select("caption",p)[0],"class":v.getAttrib(p,"class")},c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(w.align=a)}))):(q={label:"Cols",name:"cols"},r={label:"Rows",name:"rows"}),d.settings.table_class_list&&(w["class"]&&(w["class"]=w["class"].replace(/\s*mce\-item\-table\s*/g,"")),s={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"table",classes:[a.value]})})})}),t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:d.settings.table_appearance_options!==!1?[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},s]},d.settings.table_advtab!==!1?(m(v,w,p),d.windowManager.open({title:"Table properties",data:w,bodyType:"tabpanel",body:[{title:"General",type:"form",items:t},f(v)],onsubmit:j})):d.windowManager.open({title:"Table properties",data:w,body:t,onsubmit:j})},o.merge=function(a,b){d.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",value:"1",size:10},{label:"Rows",name:"rows",type:"textbox",value:"1",size:10}],onsubmit:function(){var c=this.toJSON();d.undoManager.transact(function(){a.merge(b,c.cols,c.rows)})}})},o.cell=function(){function b(){l(p,this),n=a.extend(n,this.toJSON()),d.undoManager.transact(function(){c(q,function(a){d.dom.setAttribs(a,{scope:n.scope,style:n.style,"class":n["class"]}),d.dom.setStyles(a,{width:h(n.width),height:h(n.height)}),n.type&&a.nodeName.toLowerCase()!=n.type&&(a=p.rename(a,n.type)),i(a),n.align&&d.formatter.apply("align"+n.align,{},a),j(a),n.valign&&d.formatter.apply("valign"+n.valign,{},a)}),d.focus()})}var e,n,o,p=d.dom,q=[];if(q=d.dom.select("td[data-mce-selected],th[data-mce-selected]"),e=d.dom.getParent(d.selection.getStart(),"td,th"),!q.length&&e&&q.push(e),e=e||q[0]){n={width:g(p.getStyle(e,"width")||p.getAttrib(e,"width")),height:g(p.getStyle(e,"height")||p.getAttrib(e,"height")),scope:p.getAttrib(e,"scope"),"class":p.getAttrib(e,"class")},n.type=e.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(e,"align"+a)&&(n.align=a)}),c("top middle bottom".split(" "),function(a){d.formatter.matchNode(e,"valign"+a)&&(n.valign=a)}),d.settings.table_cell_class_list&&(o={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_cell_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"td",classes:[a.value]})})})});var r={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},o]};d.settings.table_cell_advtab!==!1?(m(p,n,e),d.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:n,body:[{title:"General",type:"form",items:r},f(p)],onsubmit:b})):d.windowManager.open({title:"Cell properties",data:n,body:r,onsubmit:b})}},o.row=function(){function b(){var b,e,f;l(r,this),p=a.extend(p,this.toJSON()),d.undoManager.transact(function(){var a=p.type;c(s,function(c){d.dom.setAttribs(c,{scope:p.scope,style:p.style,"class":p["class"]}),d.dom.setStyles(c,{height:h(p.height)}),a!=c.parentNode.nodeName.toLowerCase()&&(b=r.getParent(c,"table"),e=c.parentNode,f=r.select(a,b)[0],f||(f=r.create(a),b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)),f.appendChild(c),e.hasChildNodes()||r.remove(e)),i(c),p.align&&d.formatter.apply("align"+p.align,{},c)}),d.focus()})}var e,j,n,o,p,q,r=d.dom,s=[];e=d.dom.getParent(d.selection.getStart(),"table"),j=d.dom.getParent(d.selection.getStart(),"td,th"),c(e.rows,function(a){c(a.cells,function(b){return r.getAttrib(b,"data-mce-selected")||b==j?(s.push(a),!1):void 0})}),n=s[0],n&&(p={height:g(r.getStyle(n,"height")||r.getAttrib(n,"height")),scope:r.getAttrib(n,"scope"),"class":r.getAttrib(n,"class")},p.type=n.parentNode.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(n,"align"+a)&&(p.align=a)}),d.settings.table_row_class_list&&(o={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_row_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"tr",classes:[a.value]})})})}),q={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"None",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},o]},d.settings.table_row_advtab!==!1?(m(r,p,n),d.windowManager.open({title:"Row properties",data:p,bodyType:"tabpanel",body:[{title:"General",type:"form",items:q},f(r)],onsubmit:b})):d.windowManager.open({title:"Row properties",data:p,body:q,onsubmit:b}))}}}),d("tinymce/tableplugin/ResizeBars",["tinymce/util/Tools","tinymce/util/VK"],function(a,c){var d;return function(e){function f(a,b){return{index:a,y:e.dom.getPos(b).y}}function g(a,b){return{index:a,y:e.dom.getPos(b).y+b.offsetHeight}}function h(a,b){return{index:a,x:e.dom.getPos(b).x}}function i(a,b){return{index:a,x:e.dom.getPos(b).x+b.offsetWidth}}function j(){var a=e.getBody().dir;return"rtl"===a}function k(){return e.inline}function l(){return k?e.getBody().ownerDocument.body:e.getBody()}function m(a,b){return j()?i(a,b):h(a,b)}function n(a,b){return j()?h(a,b):i(a,b)}function o(a,b){return p(a,"width")/p(b,"width")*100}function p(a,b){var c=e.dom.getStyle(a,b,!0),d=parseInt(c,10);return d}function q(a){var b=p(a,"width"),c=p(a.parentElement,"width");return b/c*100}function r(a,b){var c=p(a,"width");return b/c*100}function s(a,b){var c=p(a.parentElement,"width");return b/c*100}function t(a,b,c){for(var d=[],e=1;e<c.length;e++){var f=c[e].element;d.push(a(e-1,f))}var g=c[c.length-1];return d.push(b(c.length-1,g.element)),d}function u(){var b=e.dom.select("."+ma,l());a.each(b,function(a){e.dom.remove(a)})}function v(a){u(),F(a)}function w(a,b,c,d,e,f,g,h){var i={"data-mce-bogus":"all","class":ma+" "+a,unselectable:"on","data-mce-resize":!1,style:"cursor: "+b+"; margin: 0; padding: 0; position: absolute; left: "+c+"px; top: "+d+"px; height: "+e+"px; width: "+f+"px; "};return i[g]=h,i}function x(b,c,d){a.each(b,function(a){var b=d.x,f=a.y-va/2,g=va,h=c;e.dom.add(l(),"div",w(na,oa,b,f,g,h,pa,a.index))})}function y(b,c,d){a.each(b,function(a){var b=a.x-va/2,f=d.y,g=c,h=va;e.dom.add(l(),"div",w(ra,sa,b,f,g,h,ta,a.index))})}function z(b){return a.map(b.rows,function(b){var c=a.map(b.cells,function(a){var b=a.hasAttribute("rowspan")?parseInt(a.getAttribute("rowspan"),10):1,c=a.hasAttribute("colspan")?parseInt(a.getAttribute("colspan"),10):1;return{element:a,rowspan:b,colspan:c}});return{element:b,cells:c}})}function A(c){function d(a,b){return a+","+b}function e(a,b){return h[d(a,b)]}function f(){var b=[];return a.each(i,function(a){b=b.concat(a.cells)}),b}function g(){return i}var h={},i=[],j=0,k=0;return a.each(c,function(c,e){var f=[];a.each(c.cells,function(a){for(var c=0;h[d(e,c)]!==b;)c++;for(var g={element:a.element,colspan:a.colspan,rowspan:a.rowspan,rowIndex:e,colIndex:c},i=0;i<a.colspan;i++)for(var l=0;l<a.rowspan;l++){var m=e+l,n=c+i;h[d(m,n)]=g,j=Math.max(j,m+1),k=Math.max(k,n+1)}f.push(g)}),i.push({element:c.element,cells:f})}),{grid:{maxRows:j,maxCols:k},getAt:e,getAllCells:f,getAllRows:g}}function B(a,b){for(var c=[],d=a;b>d;d++)c.push(d);return c}function C(a,b,c){for(var d,e=a(),f=0;f<e.length;f++)b(e[f])&&(d=e[f]);return d?d:c()}function D(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(c,function(a){function c(){for(var c=[],e=0;e<d.length;e++){var f=b.getAt(e,a);f&&f.colIndex===a&&c.push(f)}return c}function e(a){return 1===a.colspan}function f(){for(var c,e=0;e<d.length;e++)if(c=b.getAt(e,a))return c;return null}return C(c,e,f)})}function E(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(d,function(a){function d(){for(var d=[],e=0;e<c.length;e++){var f=b.getAt(a,e);f&&f.rowIndex===a&&d.push(f)}return d}function e(a){return 1===a.rowspan}function f(){return b.getAt(a,0)}return C(d,e,f)})}function F(a){var b=z(a),c=A(b),d=E(c),h=D(c),i=e.dom.getPos(a),j=d.length>0?t(f,g,d):[],k=h.length>0?t(m,n,h):[];x(j,a.offsetWidth,i),y(k,a.offsetHeight,i)}function G(a,b,c,d){if(0>b||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g<f.length;g++)f[g]&&(e={value:f[g],delta:g+1});var h=a[b+1];if(h)h={value:h,delta:1};else for(var i=a.slice(b+1),j=0;j<i.length;j++)i[j]&&(h={value:i[j],delta:j+1});var k=h.delta-e.delta,l=Math.abs(h.value-e.value)/k;return c?l/p(d,"width")*100:l}function H(a,b){var c=e.dom.getStyle(a,b);return c||(c=e.dom.getAttrib(a,b)),c||(c=e.dom.getStyle(a,b,!0)),c}function I(a,b,c){var d=H(a,"width"),e=parseInt(d,10),f=b?o(a,c):p(a,"width");return(b&&!R(d)||!b&&!S(d))&&(e=0),!isNaN(e)&&e>0?e:f}function J(b,c,d){for(var e=D(b),f=a.map(e,function(a){return m(a.colIndex,a.element).x}),g=[],h=0;h<e.length;h++){var i=e[h].element.hasAttribute("colspan")?parseInt(e[h].element.getAttribute("colspan"),10):1,j=i>1?G(f,h):I(e[h].element,c,d);j=j?j:wa,g.push(j)}return g}function K(a){var b=H(a,"height"),c=parseInt(b,10);return R(b)&&(c=0),!isNaN(c)&&c>0?c:p(a,"height")}function L(b){for(var c=E(b),d=a.map(c,function(a){return f(a.rowIndex,a.element).y}),e=[],g=0;g<c.length;g++){var h=c[g].element.hasAttribute("rowspan")?parseInt(c[g].element.getAttribute("rowspan"),10):1,i=h>1?G(d,g):K(c[g].element);i=i?i:xa,e.push(i)}return e}function M(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&c<b.length-1?i(c,c+1):c===b.length-1?j(c-1,c):[]}function N(a,b,c){for(var d=0,e=a;b>e;e++)d+=c[e];return d}function O(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.colIndex,a.colIndex+a.colspan,c);return{element:a.element,width:b,colspan:a.colspan}})}function P(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.rowIndex,a.rowIndex+a.rowspan,c);return{element:a.element,height:b,rowspan:a.rowspan}})}function Q(b,c){var d=b.getAllRows();return a.map(d,function(a,b){return{element:a.element,height:c[b]}})}function R(a){return za.test(a)}function S(a){return Aa.test(a)}function T(b,c,d){function f(b,c){a.each(b,function(a){e.dom.setStyle(a.element,"width",a.width+c),e.dom.setAttrib(a.element,"width",null)})}function g(){return d<k.grid.maxCols-1?q(b):q(b)+s(b,c)}function h(){return d<k.grid.maxCols-1?p(b,"width"):p(b,"width")+c}function i(a,c,f){d!=k.grid.maxCols-1&&f||(e.dom.setStyle(b,"width",a+c),e.dom.setAttrib(b,"width",null))}for(var j=z(b),k=A(j),l=R(b.width)||R(b.style.width),m=J(k,l,b),n=l?r(b,c):c,o=M(m,d,n,wa,l,b),t=[],u=0;u<o.length;u++)t.push(o[u]+m[u]);var v=O(k,t),w=l?"%":"px",x=l?g():h();e.undoManager.transact(function(){f(v,w),i(x,w,l)})}function U(b,c,d){for(var f=z(b),g=A(f),h=L(g),i=[],j=0,k=0;k<h.length;k++)i.push(k===d?c+h[k]:h[k]),j+=j[k];var l=P(g,i),m=Q(g,i);e.undoManager.transact(function(){a.each(m,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),a.each(l,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),e.dom.setStyle(b,"height",j+"px"),e.dom.setAttrib(b,"height",null)})}function V(){ga=setTimeout(function(){Z()},200)}function W(){clearTimeout(ga)}function X(){var a=document.createElement("div");return a.setAttribute("style","margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; height: 100%; width: 100%;"),a.setAttribute("data-mce-bogus","all"),a}function Y(a,b){e.dom.bind(a,"mouseup",function(){Z()}),e.dom.bind(a,"mousemove",function(a){
2
+ W(),ha&&b(a)}),e.dom.bind(a,"mouseout",function(){V()})}function Z(){if(e.dom.remove(ia),ha){e.dom.removeClass(ja,ya),ha=!1;var a,b;if(_(ja)){var c=parseInt(e.dom.getAttrib(ja,ua),10),f=e.dom.getPos(ja).x;a=parseInt(e.dom.getAttrib(ja,ta),10),b=j()?c-f:f-c,T(d,b,a)}else if(aa(ja)){var g=parseInt(e.dom.getAttrib(ja,qa),10),h=e.dom.getPos(ja).y;a=parseInt(e.dom.getAttrib(ja,pa),10),b=h-g,U(d,b,a)}v(d),e.nodeChanged()}}function $(a,b){ia=ia?ia:X(),ha=!0,e.dom.addClass(a,ya),ja=a,Y(ia,b),e.dom.add(l(),ia)}function _(a){return e.dom.hasClass(a,ra)}function aa(a){return e.dom.hasClass(a,na)}function ba(a){ka=ka!==b?ka:a.clientX;var c=a.clientX-ka;ka=a.clientX;var d=e.dom.getPos(ja).x;e.dom.setStyle(ja,"left",d+c+"px")}function ca(a){la=la!==b?la:a.clientY;var c=a.clientY-la;la=a.clientY;var d=e.dom.getPos(ja).y;e.dom.setStyle(ja,"top",d+c+"px")}function da(a){ka=b,$(a,ba)}function ea(a){la=b,$(a,ca)}function fa(a){var b=a.target,c=e.getBody();if(e.$.contains(c,d)||d===c)if(_(b)){a.preventDefault();var f=e.dom.getPos(b).x;e.dom.setAttrib(b,ua,f),da(b)}else if(aa(b)){a.preventDefault();var g=e.dom.getPos(b).y;e.dom.setAttrib(b,qa,g),ea(b)}else u()}var ga,ha,ia,ja,ka,la,ma="mce-resize-bar",na="mce-resize-bar-row",oa="row-resize",pa="data-row",qa="data-initial-top",ra="mce-resize-bar-col",sa="col-resize",ta="data-col",ua="data-initial-left",va=4,wa=10,xa=10,ya="mce-resize-bar-dragging",za=new RegExp(/(\d+(\.\d+)?%)/),Aa=new RegExp(/px|em/);return e.on("init",function(){e.dom.bind(l(),"mousedown",fa)}),e.on("ObjectResized",function(b){var c=b.target;if("TABLE"===c.nodeName){var d=[];a.each(c.rows,function(b){a.each(b.cells,function(a){var b=e.dom.getStyle(a,"width",!0);d.push({cell:a,width:b})})}),a.each(d,function(a){e.dom.setStyle(a.cell,"width",a.width),e.dom.setAttrib(a.cell,"width",null)})}}),e.on("mouseover",function(a){if(!ha){var b=e.dom.getParent(a.target,"table");("TABLE"===a.target.nodeName||b)&&(d=b,v(b))}}),e.on("keydown",function(a){switch(a.keyCode){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:u()}}),e.on("remove",function(){u(),e.dom.unbind(l(),"mousedown",fa)}),{adjustWidth:T,adjustHeight:U,clearBars:u,drawBars:F,determineDeltas:M,getTableGrid:A,getTableDetails:z,getWidths:J,getPixelHeights:L,isPercentageBasedSize:R,isPixelBasedSize:S,recalculateWidths:O,recalculateCellHeights:P,recalculateRowHeights:Q}}}),d("tinymce/tableplugin/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/tableplugin/ResizeBars","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(a,b,c,d,e,f,g,h,i){function j(f){function g(a){return function(){f.execCommand(a)}}function i(a,b){var c,d,e,g;for(e='<table id="__mce"><tbody>',c=0;b>c;c++){for(e+="<tr>",d=0;a>d;d++)e+="<td>"+(h.ie&&h.ie<10?"&nbsp;":"<br>")+"</td>";e+="</tr>"}return e+="</tbody></table>",f.undoManager.transact(function(){f.insertContent(e),g=f.dom.get("__mce"),f.dom.setAttrib(g,"id",null),f.$("tr",g).each(function(a,b){f.fire("newrow",{node:b}),f.$("th,td",b).each(function(a,b){f.fire("newcell",{node:b})})}),f.dom.setAttribs(g,f.settings.table_default_attributes||{}),f.dom.setStyles(g,f.settings.table_default_styles||{})}),g}function j(a,b,c){function d(){var d,e,g,h={},i=0;e=f.dom.select("td[data-mce-selected],th[data-mce-selected]"),d=e[0],d||(d=f.selection.getStart()),c&&e.length>0?(k(e,function(a){return h[a.parentNode.parentNode.nodeName]=1}),k(h,function(a){i+=a}),g=1!==i):g=!f.dom.getParent(d,b),a.disabled(g),f.selection.selectorChanged(b,function(b){a.disabled(!b)})}f.initialized?d():f.on("init",d)}function l(){j(this,"table")}function m(){j(this,"td,th")}function n(){j(this,"td,th",!0)}function o(){var a="";a='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var b=0;10>b;b++){a+="<tr>";for(var c=0;10>c;c++)a+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*b+c)+'" href="#" data-mce-x="'+c+'" data-mce-y="'+b+'"></a></td>';a+="</tr>"}return a+="</table>",a+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function p(a,b,c){var d,e,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),e=0;10>e;e++)for(d=0;10>d;d++)h=j.rows[e].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=e,f.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function q(){f.addButton("tableprops",{title:"Table properties",onclick:y.tableProps,icon:"table"}),f.addButton("tabledelete",{title:"Delete table",onclick:g("mceTableDelete")}),f.addButton("tablecellprops",{title:"Cell properties",onclick:g("mceTableCellProps")}),f.addButton("tablemergecells",{title:"Merge cells",onclick:g("mceTableMergeCells")}),f.addButton("tablesplitcells",{title:"Split cell",onclick:g("mceTableSplitCells")}),f.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:g("mceTableInsertRowBefore")}),f.addButton("tableinsertrowafter",{title:"Insert row after",onclick:g("mceTableInsertRowAfter")}),f.addButton("tabledeleterow",{title:"Delete row",onclick:g("mceTableDeleteRow")}),f.addButton("tablerowprops",{title:"Row properties",onclick:g("mceTableRowProps")}),f.addButton("tablecutrow",{title:"Cut row",onclick:g("mceTableCutRow")}),f.addButton("tablecopyrow",{title:"Copy row",onclick:g("mceTableCopyRow")}),f.addButton("tablepasterowbefore",{title:"Paste row before",onclick:g("mceTablePasteRowBefore")}),f.addButton("tablepasterowafter",{title:"Paste row after",onclick:g("mceTablePasteRowAfter")}),f.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:g("mceTableInsertColBefore")}),f.addButton("tableinsertcolafter",{title:"Insert column after",onclick:g("mceTableInsertColAfter")}),f.addButton("tabledeletecol",{title:"Delete column",onclick:g("mceTableDeleteCol")})}function r(a){var b=f.dom.is(a,"table")&&f.getBody().contains(a);return b}function s(){var a=f.settings.table_toolbar;""!==a&&a!==!1&&(a||(a="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),f.addContextToolbar(r,a))}function t(){return v}function u(a){v=a}var v,w,x=this,y=new d(f);!f.settings.object_resizing||f.settings.table_resize_bars===!1||f.settings.object_resizing!==!0&&"table"!==f.settings.object_resizing||(w=e(f)),f.settings.table_grid===!1?f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:y.table}):f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),y.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");f.dom.removeClass(a,"mce-active"),f.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:o(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(p(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),f.undoManager.transact(function(){i(b.lastX+1,b.lastY+1)}),f.addVisual())}}]}),f.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:l,onclick:y.tableProps}),f.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"}),f.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:m},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:n},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:m}]}),f.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:m},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:m},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:m},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:m},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:m},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:m},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:m},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:m}]}),f.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:m},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:m},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:m}]});var z=[];k("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?z.push({text:"-"}):z.push(f.menuItems[a])}),f.addButton("table",{type:"menubutton",title:"Table",menu:z}),h.isIE||f.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(f.selection.select(a),f.nodeChanged())}),x.quirks=new b(f),f.on("Init",function(){x.cellSelection=new c(f,function(a){a&&w.clearBars()}),x.resizeBars=w}),f.on("PreInit",function(){f.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),k({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=f.dom.getParent(f.selection.getStart(),"th,td"),f.dom.select("td[data-mce-selected],th[data-mce-selected]").length?a.merge():y.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRow(!0)},mceTableInsertRowAfter:function(a){a.insertRow()},mceTableInsertColBefore:function(a){a.insertCol(!0)},mceTableInsertColAfter:function(a){a.insertCol()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){v=a.cutRows()},mceTableCopyRow:function(a){v=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(v,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(v)},mceTableDelete:function(a){w&&w.clearBars(),a.deleteTable()}},function(b,c){f.addCommand(c,function(){var c=new a(f);c&&(b(c),f.execCommand("mceRepaint"),x.cellSelection.clear())})}),k({mceInsertTable:y.table,mceTableProps:function(){y.table(!0)},mceTableRowProps:y.row,mceTableCellProps:y.cell},function(a,b){f.addCommand(b,function(b,c){a(c)})}),q(),s(),f.settings.table_tab_navigation!==!1&&f.on("keydown",function(b){var c,d,e;9==b.keyCode&&(c=f.dom.getParent(f.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(f),e=b.shiftKey?-1:1,f.undoManager.transact(function(){!d.moveRelIdx(c,e)&&e>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,e))})))}),x.insertTable=i,x.setClipboardRows=u,x.getClipboardRows=t}var k=f.each;i.add("table",j)})}(this);
mce/wptadv/plugin.js CHANGED
@@ -1,7 +1,12 @@
1
- /*global tinymce:true */
2
-
3
- tinymce.PluginManager.add( 'wptadv', function( editor ) {
4
- var regex = [
 
 
 
 
 
5
  new RegExp('https?://(www\\.)?youtube\\.com/(watch|playlist).*', 'i'),
6
  new RegExp('https?://youtu.be/.*', 'i'),
7
  new RegExp('https?://blip.tv/.*', 'i'),
@@ -40,61 +45,79 @@ tinymce.PluginManager.add( 'wptadv', function( editor ) {
40
  new RegExp('https?://(.+)\.tumblr\.com/post/.*', 'i'),
41
  new RegExp('https?://(www\.)?kickstarter\.com/projects/.*', 'i'),
42
  new RegExp('https?://kck\.st/.*', 'i')
43
- ],
44
- blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
45
- '|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
46
- '|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary',
47
- trim = tinymce.trim;
48
 
49
- function addLineBreaks( html ) {
50
- html = html.replace( new RegExp( '<(?:' + blocklist + ')(?: [^>]*)?>', 'gi' ), '\n$&' );
51
- html = html.replace( new RegExp( '</(?:' + blocklist + ')>', 'gi' ), '$&\n' );
52
- html = html.replace( new RegExp( '<br(?: [^>]*)?>', 'gi' ), '$&\n' );
53
- html = html.replace( />\n\n</g, '>\n<' );
54
- html = html.replace( /^<li/gm, '\t<li' );
55
 
56
- return trim( html );
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- if ( ! editor.settings.wpautop && editor.settings.tadv_noautop ) {
60
  editor.on( 'init', function() {
61
- editor.on( 'SaveContent', function( event ) {
62
- event.content = event.content.replace( /<p>\s*(https?:\/\/[^<>"\s]+)\s*<\/p>/ig, function( all, match ) {
63
- for( var i in regex ) {
64
- if ( regex[i].test( match ) ) {
65
- return '\n' + match + '\n';
66
- // return '<p>[embed]' + match + '[/embed]</p>';
67
- }
 
 
 
 
68
  }
69
- return all;
70
- })
71
- .replace( /caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g, 'caption] [caption' )
72
- .replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) {
73
- return match.replace( /[\r\n]+/g, ' ' );
74
- })
75
- .replace( /<pre[^>]*>[\s\S]+?<\/pre>/g, function( match ) {
76
- match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
77
- return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
 
 
 
 
78
  });
79
- }); // end SaveContent
80
 
81
- editor.on( 'hide', function() {
82
- var textarea = editor.getElement();
83
- textarea.value = addLineBreaks( textarea.value );
84
- });
 
85
  });
86
 
87
- editor.on( 'beforeSetContent', function( event ) {
88
- var wp = window.wp,
89
- autop = wp && wp.editor && wp.editor.autop;
90
-
91
- if ( event.load ) {
92
- event.content = event.content.replace( /(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/igm, '$1<p>$2</p>$3' );
93
 
94
- if ( autop && event.content && event.content.indexOf( '\n' ) > -1 && ! /<p>/i.test( event.content ) ) {
95
  event.content = autop( event.content );
96
  }
97
- }
98
- }, true );
99
- }
100
- });
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
3
+ * For more information please see tinymce-advanced.php.
4
+ *
5
+ * Copyright (c) 2007-2016 Andrew Ozz. All rights reserved.
6
+ */
7
+ ( function( tinymce ) {
8
+ tinymce.PluginManager.add( 'wptadv', function( editor ) {
9
+ var regex = editor.settings.tadv_oembed_regex || [
10
  new RegExp('https?://(www\\.)?youtube\\.com/(watch|playlist).*', 'i'),
11
  new RegExp('https?://youtu.be/.*', 'i'),
12
  new RegExp('https?://blip.tv/.*', 'i'),
45
  new RegExp('https?://(.+)\.tumblr\.com/post/.*', 'i'),
46
  new RegExp('https?://(www\.)?kickstarter\.com/projects/.*', 'i'),
47
  new RegExp('https?://kck\.st/.*', 'i')
48
+ ];
 
 
 
 
49
 
50
+ var noAutop = ( ! editor.settings.wpautop && editor.settings.tadv_noautop );
 
 
 
 
 
51
 
52
+ function addLineBreaks( html ) {
53
+ var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
54
+ '|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
55
+ '|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
56
+
57
+ html = html.replace( new RegExp( '<(?:' + blocklist + ')(?: [^>]*)?>', 'gi' ), '\n$&' );
58
+ html = html.replace( new RegExp( '</(?:' + blocklist + ')>', 'gi' ), '$&\n' );
59
+ html = html.replace( /(<br(?: [^>]*)?>)[\r\n\t]*/gi, '$1\n' );
60
+ html = html.replace( />\n[\r\n\t]+</g, '>\n<' );
61
+ html = html.replace( /^<li/gm, '\t<li' );
62
+ html = html.replace( /<td>\u00a0<\/td>/g, '<td>&nbsp;</td>' );
63
+
64
+ return tinymce.trim( html );
65
+ }
66
 
 
67
  editor.on( 'init', function() {
68
+ if ( noAutop ) {
69
+ editor.on( 'SaveContent', function( event ) {
70
+ if ( editor.settings.tadv_noautop2 ) {
71
+ event.content = event.content.replace( /<p>\s*(https?:\/\/[^<>\s]+)\s*<\/p>/ig, function( all, match ) {
72
+ for( var i in regex ) {
73
+ if ( regex[i].test( match ) ) {
74
+ return match + '\n\n';
75
+ }
76
+ }
77
+ return all;
78
+ });
79
  }
80
+
81
+ event.content = event.content.replace( /caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g, 'caption] [caption' );
82
+
83
+ event.content = event.content.replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) {
84
+ return match.replace( /[\r\n\t ]+/g, ' ' );
85
+ });
86
+
87
+ event.content = event.content.replace( /<pre( [^>]*)?>[\s\S]+?<\/pre>/g, function( match ) {
88
+ match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
89
+ return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
90
+ });
91
+
92
+ event.content = addLineBreaks( event.content );
93
  });
94
+ }
95
 
96
+ try {
97
+ if ( editor.plugins.searchreplace && ! editor.controlManager.buttons.searchreplace ) {
98
+ editor.shortcuts.remove( 'meta+f' );
99
+ }
100
+ } catch ( er ) {}
101
  });
102
 
103
+ if ( noAutop ) {
104
+ editor.on( 'beforeSetContent', function( event ) {
105
+ var autop = typeof window.wp !== 'undefined' && window.wp.editor && window.wp.editor.autop;
 
 
 
106
 
107
+ if ( event.load && autop && event.content && event.content.indexOf( '\n' ) > -1 && ! /<p>/i.test( event.content ) ) {
108
  event.content = autop( event.content );
109
  }
110
+ }, true );
111
+ }
112
+
113
+ editor.on( 'beforeGetContent', function( event ) {
114
+ if ( event.format !== 'raw' ) {
115
+ editor.$( 'img[id="__wp-temp-img-id"]' ).attr( 'id', null );
116
+ }
117
+ });
118
+
119
+ return {
120
+ addLineBreaks: addLineBreaks
121
+ };
122
+ });
123
+ }( window.tinymce ));
mce/wptadv/plugin.min.js CHANGED
@@ -1 +1 @@
1
- tinymce.PluginManager.add("wptadv",function(a){function b(a){return a=a.replace(new RegExp("<(?:"+d+")(?: [^>]*)?>","gi"),"\n$&"),a=a.replace(new RegExp("</(?:"+d+")>","gi"),"$&\n"),a=a.replace(new RegExp("<br(?: [^>]*)?>","gi"),"$&\n"),a=a.replace(/>\n\n</g,">\n<"),a=a.replace(/^<li/gm," <li"),e(a)}var c=[new RegExp("https?://(www\\.)?youtube\\.com/(watch|playlist).*","i"),new RegExp("https?://youtu.be/.*","i"),new RegExp("https?://blip.tv/.*","i"),new RegExp("https?://(www\\.)?vimeo\\.com/.*","i"),new RegExp("https?://(www\\.)?dailymotion\\.com/.*","i"),new RegExp("https?://dai.ly/.*","i"),new RegExp("https?://(www\\.)?flickr\\.com/.*","i"),new RegExp("https?://flic.kr/.*","i"),new RegExp("https?://(.+\\.)?smugmug\\.com/.*","i"),new RegExp("https?://(www\\.)?hulu\\.com/watch/.*","i"),new RegExp("https?://(www\\.)?viddler\\.com/.*","i"),new RegExp("https?://qik.com/.*","i"),new RegExp("https?://revision3.com/.*","i"),new RegExp("https?://i*.photobucket.com/albums/.*","i"),new RegExp("https?://gi*.photobucket.com/groups/.*","i"),new RegExp("https?://(www\\.)?scribd\\.com/.*","i"),new RegExp("https?://wordpress.tv/.*","i"),new RegExp("https?://(.+\\.)?polldaddy\\.com/.*","i"),new RegExp("https?://poll\\.fm/.*","i"),new RegExp("https?://(www\\.)?funnyordie\\.com/videos/.*","i"),new RegExp("https?://(www\\.)?twitter\\.com/.+?/status(es)?/.*","i"),new RegExp("https?://vine\\.co/v/.*","i"),new RegExp("https?://(www\\.)?soundcloud\\.com/.*","i"),new RegExp("https?://(www\\.)?slideshare\\.net/.*","i"),new RegExp("https?://instagr(\\.am|am\\.com)/p/.*","i"),new RegExp("https?://(www\\.)?rdio\\.com/.*","i"),new RegExp("https?://rd\\.io/x/.*","i"),new RegExp("https?://(open|play)\\.spotify\\.com/.*","i"),new RegExp("https?://(.+\\.)?imgur\\.com/.*","i"),new RegExp("https?://(www\\.)?meetu(\\.ps|p\\.com)/.*","i"),new RegExp("https?://(www\\.)?issuu\\.com/.+/docs/.*","i"),new RegExp("https?://(www\\.)?collegehumor\\.com/video/.*","i"),new RegExp("https?://(www\\.)?mixcloud\\.com/.*","i"),new RegExp("https?://(www\\.|embed\\.)?ted\\.com/talks/.*","i"),new RegExp("https?://(www\\.)(animoto|video214)\\.com/play/.*","i"),new RegExp("https?://(.+).tumblr.com/post/.*","i"),new RegExp("https?://(www.)?kickstarter.com/projects/.*","i"),new RegExp("https?://kck.st/.*","i")],d="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary",e=tinymce.trim;!a.settings.wpautop&&a.settings.tadv_noautop&&(a.on("init",function(){a.on("SaveContent",function(a){a.content=a.content.replace(/<p>\s*(https?:\/\/[^<>"\s]+)\s*<\/p>/gi,function(a,b){for(var d in c)if(c[d].test(b))return"\n"+b+"\n";return a}).replace(/caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g,"caption] [caption").replace(/<(object|audio|video)[\s\S]+?<\/\1>/g,function(a){return a.replace(/[\r\n]+/g," ")}).replace(/<pre[^>]*>[\s\S]+?<\/pre>/g,function(a){return a=a.replace(/<br ?\/?>(\r\n|\n)?/g,"\n"),a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"\n")})}),a.on("hide",function(){var c=a.getElement();c.value=b(c.value)})}),a.on("beforeSetContent",function(a){var b=window.wp,c=b&&b.editor&&b.editor.autop;a.load&&(a.content=a.content.replace(/(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/gim,"$1<p>$2</p>$3"),c&&a.content&&a.content.indexOf("\n")>-1&&!/<p>/i.test(a.content)&&(a.content=c(a.content)))},!0))});
1
+ !function(a){a.PluginManager.add("wptadv",function(b){function c(b){var c="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary";return b=b.replace(new RegExp("<(?:"+c+")(?: [^>]*)?>","gi"),"\n$&"),b=b.replace(new RegExp("</(?:"+c+")>","gi"),"$&\n"),b=b.replace(/(<br(?: [^>]*)?>)[\r\n\t]*/gi,"$1\n"),b=b.replace(/>\n[\r\n\t]+</g,">\n<"),b=b.replace(/^<li/gm," <li"),b=b.replace(/<td>\u00a0<\/td>/g,"<td>&nbsp;</td>"),a.trim(b)}var d=b.settings.tadv_oembed_regex||[new RegExp("https?://(www\\.)?youtube\\.com/(watch|playlist).*","i"),new RegExp("https?://youtu.be/.*","i"),new RegExp("https?://blip.tv/.*","i"),new RegExp("https?://(www\\.)?vimeo\\.com/.*","i"),new RegExp("https?://(www\\.)?dailymotion\\.com/.*","i"),new RegExp("https?://dai.ly/.*","i"),new RegExp("https?://(www\\.)?flickr\\.com/.*","i"),new RegExp("https?://flic.kr/.*","i"),new RegExp("https?://(.+\\.)?smugmug\\.com/.*","i"),new RegExp("https?://(www\\.)?hulu\\.com/watch/.*","i"),new RegExp("https?://(www\\.)?viddler\\.com/.*","i"),new RegExp("https?://qik.com/.*","i"),new RegExp("https?://revision3.com/.*","i"),new RegExp("https?://i*.photobucket.com/albums/.*","i"),new RegExp("https?://gi*.photobucket.com/groups/.*","i"),new RegExp("https?://(www\\.)?scribd\\.com/.*","i"),new RegExp("https?://wordpress.tv/.*","i"),new RegExp("https?://(.+\\.)?polldaddy\\.com/.*","i"),new RegExp("https?://poll\\.fm/.*","i"),new RegExp("https?://(www\\.)?funnyordie\\.com/videos/.*","i"),new RegExp("https?://(www\\.)?twitter\\.com/.+?/status(es)?/.*","i"),new RegExp("https?://vine\\.co/v/.*","i"),new RegExp("https?://(www\\.)?soundcloud\\.com/.*","i"),new RegExp("https?://(www\\.)?slideshare\\.net/.*","i"),new RegExp("https?://instagr(\\.am|am\\.com)/p/.*","i"),new RegExp("https?://(www\\.)?rdio\\.com/.*","i"),new RegExp("https?://rd\\.io/x/.*","i"),new RegExp("https?://(open|play)\\.spotify\\.com/.*","i"),new RegExp("https?://(.+\\.)?imgur\\.com/.*","i"),new RegExp("https?://(www\\.)?meetu(\\.ps|p\\.com)/.*","i"),new RegExp("https?://(www\\.)?issuu\\.com/.+/docs/.*","i"),new RegExp("https?://(www\\.)?collegehumor\\.com/video/.*","i"),new RegExp("https?://(www\\.)?mixcloud\\.com/.*","i"),new RegExp("https?://(www\\.|embed\\.)?ted\\.com/talks/.*","i"),new RegExp("https?://(www\\.)(animoto|video214)\\.com/play/.*","i"),new RegExp("https?://(.+).tumblr.com/post/.*","i"),new RegExp("https?://(www.)?kickstarter.com/projects/.*","i"),new RegExp("https?://kck.st/.*","i")],e=!b.settings.wpautop&&b.settings.tadv_noautop;return b.on("init",function(){e&&b.on("SaveContent",function(a){b.settings.tadv_noautop2&&(a.content=a.content.replace(/<p>\s*(https?:\/\/[^<>\s]+)\s*<\/p>/gi,function(a,b){for(var c in d)if(d[c].test(b))return b+"\n\n";return a})),a.content=a.content.replace(/caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g,"caption] [caption"),a.content=a.content.replace(/<(object|audio|video)[\s\S]+?<\/\1>/g,function(a){return a.replace(/[\r\n\t ]+/g," ")}),a.content=a.content.replace(/<pre( [^>]*)?>[\s\S]+?<\/pre>/g,function(a){return a=a.replace(/<br ?\/?>(\r\n|\n)?/g,"\n"),a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"\n")}),a.content=c(a.content)});try{b.plugins.searchreplace&&!b.controlManager.buttons.searchreplace&&b.shortcuts.remove("meta+f")}catch(a){}}),e&&b.on("beforeSetContent",function(a){var b="undefined"!=typeof window.wp&&window.wp.editor&&window.wp.editor.autop;a.load&&b&&a.content&&a.content.indexOf("\n")>-1&&!/<p>/i.test(a.content)&&(a.content=b(a.content))},!0),b.on("beforeGetContent",function(a){"raw"!==a.format&&b.$('img[id="__wp-temp-img-id"]').attr("id",null)}),{addLineBreaks:c}})}(window.tinymce);
readme.txt CHANGED
@@ -1,35 +1,50 @@
1
  === TinyMCE Advanced ===
2
  Contributors: azaozz
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
- Requires at least: 4.5
5
- Tested up to: 4.5
6
- Stable tag: 4.3.10
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Enables the advanced features of TinyMCE, the WordPress WYSIWYG editor.
11
 
12
  == Description ==
13
 
14
- This plugin will let you add, remove and arrange the buttons that are shown on the Visual Editor toolbar.
15
- It includes 15 plugins for [TinyMCE](http://tinymce.com/) that are automatically enabled or disabled depending on what buttons are chosen.
 
 
 
 
 
 
 
16
 
17
  = Some of the features added by this plugin =
18
 
19
  * Support for creating and editing tables.
20
  * More options when inserting lists.
21
  * Search and Replace in the editor.
22
- * Ability to set Font Family and Font Size.
23
  * And many others.
24
 
25
- With this plugin you will also be able to enable the TinyMCE menu. It is a convenient way to access a lot of features that are not used frequently.
 
26
 
27
  == Installation ==
28
 
29
- Best is to install directly from WordPress. If manual installation is required, please make sure that the plugin files are in a folder named "tinymce-advanced" (not two nested folders) in the WordPress plugins folder, usually "wp-content/plugins".
 
 
30
 
31
  == Changelog ==
32
 
 
 
 
 
 
33
  = 4.3.10.1 =
34
  * Fixed adding paragraph tags when loading posts that were saved before turning autop off.
35
  * Disabled the (new) inline toolbar for tables as it was overlapping the table in some cases.
@@ -169,7 +184,10 @@ These styles are imported from your current theme editor-style.css file. However
169
 
170
  = I have just installed this plugin, but it does not do anything. =
171
 
172
- Log out of WordPress, clear your browser cache, quit and restart the browser and try again. If that does not work, there may be a caching proxy or network cache somewhere between you and your host. You may need to wait for a few hours until this cache expires.
 
 
 
173
 
174
  = When I add "Smilies", they do not show in the editor. =
175
 
@@ -191,4 +209,7 @@ Please post on the support forum or visit the homepage for [TinyMCE Advanced](ht
191
  == Screenshots ==
192
 
193
  1. The WordPress editor after installing this plugin (default plugin settings).
194
- 2. The TinyMCE Advanced settings page.
 
 
 
1
  === TinyMCE Advanced ===
2
  Contributors: azaozz
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
+ Requires at least: 4.6
5
+ Tested up to: 4.6
6
+ Stable tag: 4.4.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ Extends and enhances TinyMCE, the WordPress Visual Editor.
11
 
12
  == Description ==
13
 
14
+ This plugin will let you add, remove and arrange the buttons that are shown
15
+ on the Visual Editor toolbar. You can configure up to four rows of buttons
16
+ including Font Sizes, Font Family, text and background colors, tables, etc.
17
+ It will also let you enable the editor menu, see the [screenshots](screenshots).
18
+
19
+ It includes 15 plugins for [TinyMCE](http://tinymce.com/) that are automatically
20
+ enabled or disabled depending on the buttons you have chosen. In addition this
21
+ plugin adds some commonly used options as keeping the paragraph tags in the Text
22
+ editor and importing the CSS classes from the theme's editor-style.css.
23
 
24
  = Some of the features added by this plugin =
25
 
26
  * Support for creating and editing tables.
27
  * More options when inserting lists.
28
  * Search and Replace in the editor.
29
+ * Ability to set Font Family and Font Sizes.
30
  * And many others.
31
 
32
+ With this plugin you can also enable the TinyMCE menu above the toolbars.
33
+ This will make the editor even more powerful and convenient.
34
 
35
  == Installation ==
36
 
37
+ Best is to install directly from WordPress. If manual installation is required,
38
+ please make sure that the plugin files are in a folder named "tinymce-advanced"
39
+ (not two nested folders) in the WordPress plugins folder, usually "wp-content/plugins".
40
 
41
  == Changelog ==
42
 
43
+ = 4.4.1 =
44
+ * Updated for WordPress 4.6 and TinyMCE 4.4.1.
45
+ * Fixed multisite saving bug.
46
+ * Added new button in the Text editor to add or reset the line breaks. Adds line breaks only between tags. Works only when it detects that line breaks are missing so it doesn't reformat posts with removed paragraphs.
47
+
48
  = 4.3.10.1 =
49
  * Fixed adding paragraph tags when loading posts that were saved before turning autop off.
50
  * Disabled the (new) inline toolbar for tables as it was overlapping the table in some cases.
184
 
185
  = I have just installed this plugin, but it does not do anything. =
186
 
187
+ Change some buttons on one of the toolbars, save your changes, clear your browser cache, and try again.
188
+ If that does not work try reloding the Edit page several times while holding down Shift or Ctrl.
189
+ There may also be a network cache somewhere between you and your host. You may need to wait for a few hours
190
+ until this cache expires.
191
 
192
  = When I add "Smilies", they do not show in the editor. =
193
 
209
  == Screenshots ==
210
 
211
  1. The WordPress editor after installing this plugin (default plugin settings).
212
+ 2. The TinyMCE Advanced settings page, toolbars options.
213
+ 3. The TinyMCE Advanced settings page, user options.
214
+ 4. The TinyMCE Advanced settings page, advanced options.
215
+ 5. The TinyMCE Advanced settings page, admin options.
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
tadv_admin.php CHANGED
@@ -1,4 +1,10 @@
1
  <?php
 
 
 
 
 
 
2
 
3
  if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
4
  exit;
@@ -15,130 +21,28 @@ $imgpath = TADV_URL . 'images/';
15
  $tadv_options_updated = false;
16
  $settings = $admin_settings = array();
17
 
 
 
18
  if ( isset( $_POST['tadv-save'] ) ) {
19
  check_admin_referer( 'tadv-save-buttons-order' );
20
- $options_array = $admin_settings_array = $disabled_editors = $disabled_plugins = $plugins_array = array();
21
-
22
- // User settings
23
- for ( $i = 1; $i < 5; $i++ ) {
24
- $tb = 'tb' . $i;
25
-
26
- if ( $i > 1 && ! empty( $_POST[$tb] ) && is_array( $_POST[$tb] ) &&
27
- ( $wp_adv = array_search( 'wp_adv', $_POST[$tb] ) ) !== false ) {
28
- // Remove the "Toolbar toggle" button from row 2, 3 or 4.
29
- unset( $_POST[$tb][$wp_adv] );
30
- }
31
-
32
- $buttons = $this->parse_buttons( $tb );
33
- // Layer plugin buttons??
34
- $buttons = str_replace( 'insertlayer', 'insertlayer,moveforward,movebackward,absolute', $buttons );
35
- $settings['toolbar_' . $i] = $buttons;
36
- }
37
-
38
- if ( ! empty( $_POST['advlist'] ) ) {
39
- $options_array[] = 'advlist';
40
- }
41
-
42
- if ( ! empty( $_POST['contextmenu'] ) ) {
43
- $options_array[] = 'contextmenu';
44
- }
45
-
46
- if ( ! empty( $_POST['advlink'] ) ) {
47
- $options_array[] = 'advlink';
48
- }
49
-
50
- if ( ! empty( $_POST['menubar'] ) ) {
51
- $options_array[] = 'menubar';
52
- $plugins_array = array( 'anchor', 'code', 'insertdatetime', 'nonbreaking', 'print', 'searchreplace',
53
- 'table', 'visualblocks', 'visualchars' );
54
- }
55
-
56
- if ( ! empty( $_POST['fontsize_formats'] ) ) {
57
- $options_array[] = 'fontsize_formats';
58
- }
59
-
60
- // Admin settings, TODO
61
- if ( ! empty( $_POST['importcss'] ) ) {
62
- $admin_settings_array[] = 'importcss';
63
- }
64
-
65
- if ( ! empty( $_POST['no_autop'] ) ) {
66
- $admin_settings_array[] = 'no_autop';
67
- }
68
-
69
- if ( ! empty( $_POST['paste_images'] ) ) {
70
- $admin_settings_array[] = 'paste_images';
71
- }
72
-
73
- if ( ! empty( $_POST['disabled_plugins'] ) && is_array( $_POST['disabled_plugins'] ) ) {
74
- foreach( $_POST['disabled_plugins'] as $plugin ) {
75
- if ( in_array( $this->all_plugins, $plugin, true ) ) {
76
- $disabled_plugins[] = $plugin;
77
- }
78
- }
79
- }
80
-
81
- $enable_at = ( ! empty( $_POST['tadv_enable_at'] ) && is_array( $_POST['tadv_enable_at'] ) ) ? $_POST['tadv_enable_at'] : array();
82
-
83
- if ( ! array_key_exists( 'edit_post_screen', $enable_at ) ) {
84
- $disabled_editors[] = 'edit_post_screen';
85
- }
86
-
87
- if ( ! array_key_exists( 'rest_of_wpadmin', $enable_at ) ) {
88
- $disabled_editors[] = 'rest_of_wpadmin';
89
- }
90
-
91
- if ( ! array_key_exists( 'on_front_end', $enable_at ) ) {
92
- $disabled_editors[] = 'on_front_end';
93
- }
94
-
95
- // Admin options
96
- $admin_settings['options'] = implode( ',', $admin_settings_array );
97
- $admin_settings['disabled_plugins'] = implode( ',', $disabled_plugins );
98
- $admin_settings['disabled_editors'] = implode( ',', $disabled_editors );
99
-
100
- $this->admin_settings = $admin_settings;
101
- update_option( 'tadv_admin_settings', $admin_settings );
102
-
103
- // User options
104
- // TODO allow editors, authors and contributors some access
105
- $this->settings = $settings;
106
- $this->load_settings();
107
-
108
- // Special case
109
- if ( in_array( 'image', $this->used_buttons, true ) ) {
110
- $options_array[] = 'image';
111
- }
112
-
113
- $settings['options'] = implode( ',', $options_array );
114
- $this->settings = $settings;
115
- $this->load_settings();
116
-
117
- // Merge the submitted plugins buttons
118
- $settings['plugins'] = implode( ',', $this->get_plugins( $plugins_array ) );
119
- $this->settings = $settings;
120
- $this->plugins = $settings['plugins'];
121
-
122
- // Save the new settings. TODO: per user
123
- update_option( 'tadv_settings', $settings );
124
-
125
  } elseif ( isset( $_POST['tadv-restore-defaults'] ) ) {
126
  check_admin_referer( 'tadv-save-buttons-order' );
127
 
128
  // TODO: only for admin || SA
129
- $this->admin_settings = $this->default_admin_settings;
130
- update_option( 'tadv_admin_settings', $this->default_admin_settings );
131
 
132
  // TODO: all users that can have settings
133
- $this->settings = $this->default_settings;
134
- update_option( 'tadv_settings', $this->default_settings );
135
 
136
- $message = '<div class="updated"><p>' . __('Default settings restored.', 'tinymce-advanced') . '</p></div>';
137
  } elseif ( isset( $_POST['tadv-export-settings'] ) ) {
138
  check_admin_referer( 'tadv-save-buttons-order' );
139
 
140
  $this->load_settings();
141
- $output = array( 'settings' => $this->settings );
142
 
143
  // TODO: only admin || SA
144
  $output['admin_settings'] = $this->admin_settings;
@@ -195,54 +99,28 @@ if ( isset( $_POST['tadv-save'] ) ) {
195
 
196
  // TODO: all users
197
  $import = json_decode( trim( wp_unslash( $_POST['tadv-import'] ) ), true );
198
- $settings = $admin_settings = array();
199
 
200
- if ( is_array( $import ) ) {
201
- if ( ! empty( $import['settings'] ) ) {
202
- $settings = $this->sanitize_settings( $import['settings'] );
203
- }
204
-
205
- // only admin || SA
206
- if ( ! empty( $import['admin_settings'] ) ) {
207
- $admin_settings = $this->sanitize_settings( $import['admin_settings'] );
208
- }
209
- }
210
-
211
- if ( empty( $settings ) ) {
212
- $message = '<div class="error"><p>' . __('Importing of settings failed.', 'tinymce-advanced') . '</p></div>';
213
  } else {
214
- // only admin || SA
215
- $this->admin_settings = $admin_settings;
216
- update_option( 'tadv_admin_settings', $admin_settings );
217
-
218
- // User options
219
- // TODO: allow editors, authors and contributors some access
220
- $this->settings = $settings;
221
- $this->load_settings();
222
-
223
- // Merge the submitted plugins and buttons
224
- if ( ! empty( $settings['plugins'] ) ) {
225
- $settings['plugins'] = implode( ',', $this->get_plugins( explode( ',', $settings['plugins'] ) ) );
226
- }
227
-
228
- $this->plugins = $settings['plugins'];
229
-
230
- // Save the new settings
231
- update_option( 'tadv_settings', $settings );
232
  }
233
  }
234
 
 
 
 
 
235
  $this->load_settings();
236
 
237
  if ( empty( $this->toolbar_1 ) && empty( $this->toolbar_2 ) && empty( $this->toolbar_3 ) && empty( $this->toolbar_4 ) ) {
238
  $message = '<div class="error"><p>' . __( 'ERROR: All toolbars are empty. Default settings loaded.', 'tinymce-advanced' ) . '</p></div>';
239
 
240
- $this->admin_settings = $this->default_admin_settings;
241
- $this->settings = $this->default_settings;
242
  $this->load_settings();
243
  }
244
 
245
- $used_buttons = array_merge( $this->toolbar_1, $this->toolbar_2, $this->toolbar_3, $this->toolbar_4 );
246
  $all_buttons = $this->get_all_buttons();
247
 
248
  ?>
@@ -254,7 +132,7 @@ $all_buttons = $this->get_all_buttons();
254
  $this->warn_if_unsupported();
255
 
256
  if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
257
- ?><div class="updated"><p><?php _e( 'Settings saved.', 'tinymce-advanced' ); ?></p></div><?php
258
  } else {
259
  echo $message;
260
  }
@@ -269,12 +147,12 @@ if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
269
  <div id="tadvzones">
270
 
271
  <p><label>
272
- <input type="checkbox" name="menubar" id="menubar" <?php if ( $this->check_setting( 'menubar' ) ) { echo ' checked="checked"'; } ?>>
273
  <?php _e( 'Enable the editor menu.', 'tinymce-advanced' ); ?>
274
  </label></p>
275
 
276
  <div id="tadv-mce-menu" class="mce-container mce-menubar mce-toolbar mce-first mce-stack-layout-item
277
- <?php if ( $this->check_setting( 'menubar' ) ) { echo ' enabled'; } ?>">
278
  <div class="mce-container-body mce-flow-layout">
279
  <div class="mce-widget mce-btn mce-menubtn mce-first mce-flow-layout-item">
280
  <button type="button">
@@ -330,7 +208,7 @@ for ( $i = 1; $i < 5; $i++ ) {
330
 
331
  ?>
332
  <div class="tadvdropzone mce-toolbar">
333
- <ul id="tb<?php echo $i; ?>" class="container">
334
  <?php
335
 
336
  foreach( $this->$toolbar as $button ) {
@@ -355,7 +233,7 @@ for ( $i = 1; $i < 5; $i++ ) {
355
  <div class="the-button">
356
  <span class="descr"><?php echo $name; ?></span>
357
  <i class="mce-caret"></i>
358
- <input type="hidden" class="tadv-button" name="tb<?php echo $i; ?>[]" value="<?php echo $button; ?>" />
359
  </div>
360
  </div>
361
  <?php
@@ -364,7 +242,7 @@ for ( $i = 1; $i < 5; $i++ ) {
364
  <div class="tadvitem">
365
  <i class="mce-ico mce-i-<?php echo $button; ?>" title="<?php echo $name; ?>"></i>
366
  <span class="descr"><?php echo $name; ?></span>
367
- <input type="hidden" class="tadv-button" name="tb<?php echo $i; ?>[]" value="<?php echo $button; ?>" />
368
  </div>
369
  <?php
370
  }
@@ -403,7 +281,7 @@ foreach( $all_buttons as $button => $name ) {
403
  <div class="the-button">
404
  <span class="descr"><?php echo $name; ?></span>
405
  <i class="mce-caret"></i>
406
- <input type="hidden" class="tadv-button" name="tb<?php echo $i; ?>[]" value="<?php echo $button; ?>" />
407
  </div>
408
  </div>
409
  <?php
@@ -412,7 +290,7 @@ foreach( $all_buttons as $button => $name ) {
412
  <div class="tadvitem">
413
  <i class="mce-ico mce-i-<?php echo $button; ?>" title="<?php echo $name; ?>"></i>
414
  <span class="descr"><?php echo $name; ?></span>
415
- <input type="hidden" class="tadv-button" name="tb<?php echo $i; ?>[]" value="<?php echo $button; ?>" />
416
  </div>
417
  <?php
418
  }
@@ -429,28 +307,28 @@ foreach( $all_buttons as $button => $name ) {
429
  <div class="advanced-options">
430
  <h3><?php _e( 'Options', 'tinymce-advanced' ); ?></h3>
431
  <div>
432
- <label><input type="checkbox" name="advlist" id="advlist" <?php if ( $this->check_setting('advlist') ) echo ' checked="checked"'; ?> />
433
  <?php _e( 'List Style Options', 'tinymce-advanced' ); ?></label>
434
  <p>
435
  <?php _e( 'Enable more list options: upper or lower case letters for ordered lists, disk or square for unordered lists, etc.', 'tinymce-advanced' ); ?>
436
  </p>
437
  </div>
438
  <div>
439
- <label><input type="checkbox" name="contextmenu" id="contextmenu" <?php if ( $this->check_setting('contextmenu') ) echo ' checked="checked"'; ?> />
440
  <?php _e( 'Context Menu', 'tinymce-advanced' ); ?></label>
441
  <p>
442
  <?php _e( 'Replace the browser context (right-click) menu.', 'tinymce-advanced' ); ?>
443
  </p>
444
  </div>
445
  <div>
446
- <label><input type="checkbox" name="advlink" id="advlink" <?php if ( $this->check_setting('advlink') ) echo ' checked="checked"'; ?> />
447
  <?php _e( 'Alternative link dialog', 'tinymce-advanced' ); ?></label>
448
  <p>
449
  <?php _e( 'Open the TinyMCE link dialog when using the link button on the toolbar or the link menu item.', 'tinymce-advanced' ); ?>
450
  </p>
451
  </div>
452
  <div>
453
- <label><input type="checkbox" name="fontsize_formats" id="fontsize_formats" <?php if ( $this->check_setting( 'fontsize_formats' ) ) echo ' checked="checked"'; ?> />
454
  <?php _e( 'Font sizes', 'tinymce-advanced' ); ?></label>
455
  <p><?php _e( 'Replace the size setting available for fonts with: 8px 10px 12px 14px 16px 20px 24px 28px 32px 36px 48px 60px.', 'tinymce-advanced' ); ?></p>
456
  </div>
@@ -477,7 +355,7 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
477
 
478
  ?>
479
  <div>
480
- <label><input type="checkbox" name="importcss" id="importcss" <?php if ( ! $disabled && $this->check_admin_setting( 'importcss' ) ) echo ' checked="checked"'; echo $disabled; ?> />
481
  <?php _e( 'Create CSS classes menu', 'tinymce-advanced' ); ?></label>
482
  <p>
483
  <?php
@@ -506,7 +384,7 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
506
  </p>
507
  </div>
508
  <div>
509
- <label><input type="checkbox" name="no_autop" id="no_autop" <?php if ( $this->check_admin_setting( 'no_autop' ) ) echo ' checked="checked"'; ?> />
510
  <?php _e( 'Keep paragraph tags', 'tinymce-advanced' ); ?></label>
511
  <p>
512
  <?php _e( 'Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them in the Text editor.', 'tinymce-advanced' ); ?>
@@ -516,7 +394,7 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
516
  </p>
517
  </div>
518
  <div>
519
- <label><input type="checkbox" name="paste_images" id="paste_images" <?php if ( $this->check_admin_setting( 'paste_images' ) ) echo ' checked="checked"'; ?> />
520
  <?php _e( 'Enable pasting of image source', 'tinymce-advanced' ); ?></label>
521
  <p>
522
  <?php _e( 'Works only in Firefox and Safari. These browsers support pasting of images directly in the editor and convert them to base64 encoded text.', 'tinymce-advanced' ); ?>
@@ -538,15 +416,15 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
538
  <div>
539
  <h4><?php _e( 'Enable the editor enhancements for:', 'tinymce-advanced' ); ?></h4>
540
  <p>
541
- <label><input type="checkbox" name="tadv_enable_at[edit_post_screen]" <?php if ( $this->check_admin_setting( 'enable_edit_post_screen' ) ) echo ' checked="checked"'; ?> />
542
  <?php _e( 'The main editor (Add New and Edit posts and pages)', 'tinymce-advanced' ); ?></label>
543
  </p>
544
  <p>
545
- <label><input type="checkbox" name="tadv_enable_at[rest_of_wpadmin]" <?php if ( $this->check_admin_setting( 'enable_rest_of_wpadmin' ) ) echo ' checked="checked"'; ?> />
546
  <?php _e( 'Other editors in wp-admin', 'tinymce-advanced' ); ?></label>
547
  </p>
548
  <p>
549
- <label><input type="checkbox" name="tadv_enable_at[on_front_end]" <?php if ( $this->check_admin_setting( 'enable_on_front_end' ) ) echo ' checked="checked"'; ?> />
550
  <?php _e( 'Editors on the front end of the site', 'tinymce-advanced' ); ?></label>
551
  </p>
552
  </div>
1
  <?php
2
+ /**
3
+ * This file is part of the TinyMCE Advanced WordPress plugin and is released under the same license.
4
+ * For more information please see tinymce-advanced.php.
5
+ *
6
+ * Copyright (c) 2007-2016 Andrew Ozz. All rights reserved.
7
+ */
8
 
9
  if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
10
  exit;
21
  $tadv_options_updated = false;
22
  $settings = $admin_settings = array();
23
 
24
+
25
+
26
  if ( isset( $_POST['tadv-save'] ) ) {
27
  check_admin_referer( 'tadv-save-buttons-order' );
28
+ $this->save_settings();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  } elseif ( isset( $_POST['tadv-restore-defaults'] ) ) {
30
  check_admin_referer( 'tadv-save-buttons-order' );
31
 
32
  // TODO: only for admin || SA
33
+ $this->admin_settings = $this->get_default_admin_settings();
34
+ update_option( 'tadv_admin_settings', $this->get_default_admin_settings() );
35
 
36
  // TODO: all users that can have settings
37
+ $this->user_settings = $this->get_default_user_settings();
38
+ update_option( 'tadv_settings', $this->get_default_user_settings() );
39
 
40
+ $message = '<div class="updated notice notice-success is-dismissible"><p>' . __('Default settings restored.', 'tinymce-advanced') . '</p></div>';
41
  } elseif ( isset( $_POST['tadv-export-settings'] ) ) {
42
  check_admin_referer( 'tadv-save-buttons-order' );
43
 
44
  $this->load_settings();
45
+ $output = array( 'settings' => $this->user_settings );
46
 
47
  // TODO: only admin || SA
48
  $output['admin_settings'] = $this->admin_settings;
99
 
100
  // TODO: all users
101
  $import = json_decode( trim( wp_unslash( $_POST['tadv-import'] ) ), true );
 
102
 
103
+ if ( ! is_array( $import ) ) {
104
+ $message = '<div class="error"><p>' . __( 'Importing of settings failed.', 'tinymce-advanced' ) . '</p></div>';
 
 
 
 
 
 
 
 
 
 
 
105
  } else {
106
+ $this->save_settings( $import );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
108
  }
109
 
110
+ if ( empty( $_POST ) ) {
111
+ $this->check_plugin_version();
112
+ }
113
+
114
  $this->load_settings();
115
 
116
  if ( empty( $this->toolbar_1 ) && empty( $this->toolbar_2 ) && empty( $this->toolbar_3 ) && empty( $this->toolbar_4 ) ) {
117
  $message = '<div class="error"><p>' . __( 'ERROR: All toolbars are empty. Default settings loaded.', 'tinymce-advanced' ) . '</p></div>';
118
 
119
+ $this->admin_settings = $this->get_default_admin_settings();
120
+ $this->user_settings = $this->get_default_user_settings();
121
  $this->load_settings();
122
  }
123
 
 
124
  $all_buttons = $this->get_all_buttons();
125
 
126
  ?>
132
  $this->warn_if_unsupported();
133
 
134
  if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
135
+ ?><div class="updated notice notice-success is-dismissible"><p><?php _e( 'Settings saved.', 'tinymce-advanced' ); ?></p></div><?php
136
  } else {
137
  echo $message;
138
  }
147
  <div id="tadvzones">
148
 
149
  <p><label>
150
+ <input type="checkbox" name="options[]" id="menubar" value="menubar" <?php if ( $this->check_user_setting( 'menubar' ) ) { echo ' checked="checked"'; } ?>>
151
  <?php _e( 'Enable the editor menu.', 'tinymce-advanced' ); ?>
152
  </label></p>
153
 
154
  <div id="tadv-mce-menu" class="mce-container mce-menubar mce-toolbar mce-first mce-stack-layout-item
155
+ <?php if ( $this->check_user_setting( 'menubar' ) ) { echo ' enabled'; } ?>">
156
  <div class="mce-container-body mce-flow-layout">
157
  <div class="mce-widget mce-btn mce-menubtn mce-first mce-flow-layout-item">
158
  <button type="button">
208
 
209
  ?>
210
  <div class="tadvdropzone mce-toolbar">
211
+ <ul id="toolbar_<?php echo $i; ?>" class="container">
212
  <?php
213
 
214
  foreach( $this->$toolbar as $button ) {
233
  <div class="the-button">
234
  <span class="descr"><?php echo $name; ?></span>
235
  <i class="mce-caret"></i>
236
+ <input type="hidden" class="tadv-button" name="toolbar_<?php echo $i; ?>[]" value="<?php echo $button; ?>" />
237
  </div>
238
  </div>
239
  <?php
242
  <div class="tadvitem">
243
  <i class="mce-ico mce-i-<?php echo $button; ?>" title="<?php echo $name; ?>"></i>
244
  <span class="descr"><?php echo $name; ?></span>
245
+ <input type="hidden" class="tadv-button" name="toolbar_<?php echo $i; ?>[]" value="<?php echo $button; ?>" />
246
  </div>
247
  <?php
248
  }
281
  <div class="the-button">
282
  <span class="descr"><?php echo $name; ?></span>
283
  <i class="mce-caret"></i>
284
+ <input type="hidden" class="tadv-button" name="unused[]" value="<?php echo $button; ?>" />
285
  </div>
286
  </div>
287
  <?php
290
  <div class="tadvitem">
291
  <i class="mce-ico mce-i-<?php echo $button; ?>" title="<?php echo $name; ?>"></i>
292
  <span class="descr"><?php echo $name; ?></span>
293
+ <input type="hidden" class="tadv-button" name="unused[]" value="<?php echo $button; ?>" />
294
  </div>
295
  <?php
296
  }
307
  <div class="advanced-options">
308
  <h3><?php _e( 'Options', 'tinymce-advanced' ); ?></h3>
309
  <div>
310
+ <label><input type="checkbox" name="options[]" value="advlist" id="advlist" <?php if ( $this->check_user_setting('advlist') ) echo ' checked="checked"'; ?> />
311
  <?php _e( 'List Style Options', 'tinymce-advanced' ); ?></label>
312
  <p>
313
  <?php _e( 'Enable more list options: upper or lower case letters for ordered lists, disk or square for unordered lists, etc.', 'tinymce-advanced' ); ?>
314
  </p>
315
  </div>
316
  <div>
317
+ <label><input type="checkbox" name="options[]" value="contextmenu" id="contextmenu" <?php if ( $this->check_user_setting('contextmenu') ) echo ' checked="checked"'; ?> />
318
  <?php _e( 'Context Menu', 'tinymce-advanced' ); ?></label>
319
  <p>
320
  <?php _e( 'Replace the browser context (right-click) menu.', 'tinymce-advanced' ); ?>
321
  </p>
322
  </div>
323
  <div>
324
+ <label><input type="checkbox" name="options[]" value="advlink" id="advlink" <?php if ( $this->check_user_setting('advlink') ) echo ' checked="checked"'; ?> />
325
  <?php _e( 'Alternative link dialog', 'tinymce-advanced' ); ?></label>
326
  <p>
327
  <?php _e( 'Open the TinyMCE link dialog when using the link button on the toolbar or the link menu item.', 'tinymce-advanced' ); ?>
328
  </p>
329
  </div>
330
  <div>
331
+ <label><input type="checkbox" name="options[]" value="fontsize_formats" id="fontsize_formats" <?php if ( $this->check_user_setting( 'fontsize_formats' ) ) echo ' checked="checked"'; ?> />
332
  <?php _e( 'Font sizes', 'tinymce-advanced' ); ?></label>
333
  <p><?php _e( 'Replace the size setting available for fonts with: 8px 10px 12px 14px 16px 20px 24px 28px 32px 36px 48px 60px.', 'tinymce-advanced' ); ?></p>
334
  </div>
355
 
356
  ?>
357
  <div>
358
+ <label><input type="checkbox" name="admin_options[]" value="importcss" id="importcss" <?php if ( ! $disabled && $this->check_admin_setting( 'importcss' ) ) echo ' checked="checked"'; echo $disabled; ?> />
359
  <?php _e( 'Create CSS classes menu', 'tinymce-advanced' ); ?></label>
360
  <p>
361
  <?php
384
  </p>
385
  </div>
386
  <div>
387
+ <label><input type="checkbox" name="admin_options[]" value="no_autop" id="no_autop" <?php if ( $this->check_admin_setting( 'no_autop' ) ) echo ' checked="checked"'; ?> />
388
  <?php _e( 'Keep paragraph tags', 'tinymce-advanced' ); ?></label>
389
  <p>
390
  <?php _e( 'Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them in the Text editor.', 'tinymce-advanced' ); ?>
394
  </p>
395
  </div>
396
  <div>
397
+ <label><input type="checkbox" name="admin_options[]" value="paste_images" id="paste_images" <?php if ( $this->check_admin_setting( 'paste_images' ) ) echo ' checked="checked"'; ?> />
398
  <?php _e( 'Enable pasting of image source', 'tinymce-advanced' ); ?></label>
399
  <p>
400
  <?php _e( 'Works only in Firefox and Safari. These browsers support pasting of images directly in the editor and convert them to base64 encoded text.', 'tinymce-advanced' ); ?>
416
  <div>
417
  <h4><?php _e( 'Enable the editor enhancements for:', 'tinymce-advanced' ); ?></h4>
418
  <p>
419
+ <label><input type="checkbox" name="tadv_enable_at[]" value="edit_post_screen" <?php if ( $this->check_admin_setting( 'enable_edit_post_screen' ) ) echo ' checked="checked"'; ?> />
420
  <?php _e( 'The main editor (Add New and Edit posts and pages)', 'tinymce-advanced' ); ?></label>
421
  </p>
422
  <p>
423
+ <label><input type="checkbox" name="tadv_enable_at[]" value="rest_of_wpadmin" <?php if ( $this->check_admin_setting( 'enable_rest_of_wpadmin' ) ) echo ' checked="checked"'; ?> />
424
  <?php _e( 'Other editors in wp-admin', 'tinymce-advanced' ); ?></label>
425
  </p>
426
  <p>
427
+ <label><input type="checkbox" name="tadv_enable_at[]" value="on_front_end" <?php if ( $this->check_admin_setting( 'enable_on_front_end' ) ) echo ' checked="checked"'; ?> />
428
  <?php _e( 'Editors on the front end of the site', 'tinymce-advanced' ); ?></label>
429
  </p>
430
  </div>
tinymce-advanced.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
  Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
6
- Version: 4.3.10.1
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
  License: GPL2
@@ -24,15 +24,15 @@ Domain Path: /langs
24
  You should have received a copy of the GNU General Public License along
25
  with TinyMCE Advanced. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
26
 
27
- Copyright 2007-2016 Andrew Ozz
28
  */
29
 
30
  if ( ! class_exists('Tinymce_Advanced') ) :
31
 
32
  class Tinymce_Advanced {
33
 
34
- private $required_version = '4.5-beta';
35
- private $settings;
36
  private $admin_settings;
37
  private $admin_options;
38
  private $editor_id;
@@ -48,41 +48,76 @@ class Tinymce_Advanced {
48
  private $all_buttons = array();
49
  private $buttons_filter = array();
50
 
51
- private $all_plugins = array(
52
- 'advlist',
53
- 'anchor',
54
- 'code',
55
- 'contextmenu',
56
- 'emoticons',
57
- 'importcss',
58
- 'insertdatetime',
59
- 'link',
60
- 'nonbreaking',
61
- 'print',
62
- 'searchreplace',
63
- 'table',
64
- 'visualblocks',
65
- 'visualchars',
66
- 'wptadv',
67
- );
68
-
69
- private $default_settings = array(
70
- 'options' => 'menubar,advlist',
71
- 'toolbar_1' => 'bold,italic,blockquote,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,table,fullscreen,undo,redo,wp_adv',
72
- 'toolbar_2' => 'formatselect,alignjustify,strikethrough,outdent,indent,pastetext,removeformat,charmap,wp_more,emoticons,forecolor,wp_help',
73
- 'toolbar_3' => '',
74
- 'toolbar_4' => '',
75
- 'plugins' => 'anchor,code,insertdatetime,nonbreaking,print,searchreplace,table,visualblocks,visualchars,emoticons,advlist',
76
- );
77
-
78
- private $default_admin_settings = array( 'options' => array() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  public function __construct() {
81
- // Don't run outside of WP
82
  if ( ! defined('ABSPATH') ) {
83
  return;
84
  }
85
 
 
 
86
  add_action( 'plugins_loaded', array( $this, 'set_paths' ), 50 );
87
 
88
  if ( is_admin() ) {
@@ -200,32 +235,31 @@ class Tinymce_Advanced {
200
  }
201
 
202
  public function load_settings() {
203
- if ( empty( $_POST ) ) {
204
- $this->check_plugin_version();
205
  }
206
 
207
- if ( empty( $this->settings ) ) {
208
- $this->admin_settings = get_option( 'tadv_admin_settings', false );
209
- $this->settings = get_option( 'tadv_settings', false );
210
  }
211
 
212
  // load defaults if the options don't exist...
213
  if ( $this->admin_settings === false ) {
214
- $this->admin_settings = $this->default_admin_settings;
215
  }
216
 
217
  $this->admin_options = ! empty( $this->admin_settings['options'] ) ? explode( ',', $this->admin_settings['options'] ) : array();
218
 
219
- if ( $this->settings === false ) {
220
- $this->settings = $this->default_settings;
221
  }
222
 
223
- $this->options = ! empty( $this->settings['options'] ) ? explode( ',', $this->settings['options'] ) : array();
224
- $this->plugins = ! empty( $this->settings['plugins'] ) ? explode( ',', $this->settings['plugins'] ) : array();
225
- $this->toolbar_1 = ! empty( $this->settings['toolbar_1'] ) ? explode( ',', $this->settings['toolbar_1'] ) : array();
226
- $this->toolbar_2 = ! empty( $this->settings['toolbar_2'] ) ? explode( ',', $this->settings['toolbar_2'] ) : array();
227
- $this->toolbar_3 = ! empty( $this->settings['toolbar_3'] ) ? explode( ',', $this->settings['toolbar_3'] ) : array();
228
- $this->toolbar_4 = ! empty( $this->settings['toolbar_4'] ) ? explode( ',', $this->settings['toolbar_4'] ) : array();
229
 
230
  $this->used_buttons = array_merge( $this->toolbar_1, $this->toolbar_2, $this->toolbar_3, $this->toolbar_4 );
231
  $this->get_all_buttons();
@@ -270,15 +304,15 @@ class Tinymce_Advanced {
270
  return ( version_compare( $wp_version, $this->required_version, '>=' ) );
271
  }
272
 
273
- private function check_plugin_version() {
274
  $version = get_option( 'tadv_version', 0 );
275
 
276
  if ( ! $version || $version < 4000 ) {
277
  // First install or upgrade to TinyMCE 4.0
278
- $this->settings = $this->default_settings;
279
- $this->admin_settings = $this->default_admin_settings;
280
 
281
- update_option( 'tadv_settings', $this->settings );
282
  update_option( 'tadv_admin_settings', $this->admin_settings );
283
  update_option( 'tadv_version', 4000 );
284
  }
@@ -404,20 +438,20 @@ class Tinymce_Advanced {
404
  if ( in_array( 'searchreplace', $this->used_buttons, true ) )
405
  $plugins[] = 'searchreplace';
406
 
407
- if ( in_array( 'insertlayer', $this->used_buttons, true ) )
408
- $plugins[] = 'layer';
409
 
410
  // From options
411
- if ( $this->check_setting( 'advlist' ) )
412
  $plugins[] = 'advlist';
413
 
414
- if ( $this->check_setting( 'advlink' ) )
415
  $plugins[] = 'link';
416
 
417
  if ( $this->check_admin_setting( 'importcss' ) )
418
  $plugins[] = 'importcss';
419
 
420
- if ( $this->check_setting( 'contextmenu' ) )
421
  $plugins[] = 'contextmenu';
422
 
423
  // add/remove used plugins
@@ -426,7 +460,7 @@ class Tinymce_Advanced {
426
  return array_unique( $plugins );
427
  }
428
 
429
- private function check_setting( $setting ) {
430
  if ( ! is_array( $this->options ) ) {
431
  $this->load_settings();
432
  }
@@ -533,24 +567,19 @@ class Tinymce_Advanced {
533
  return $init;
534
  }
535
 
 
 
 
536
  if ( $this->check_admin_setting( 'no_autop' ) ) {
537
  $init['wpautop'] = false;
538
  // $init['indent'] = true;
539
  $init['tadv_noautop'] = true;
540
  }
541
 
542
- if ( $this->check_setting('menubar') ) {
543
  $init['menubar'] = true;
544
  }
545
 
546
- if ( $this->check_setting('image') ) {
547
- $init['image_advtab'] = true;
548
- }
549
-
550
- if ( $this->check_setting( 'advlink' ) ) {
551
- $init['rel_list'] = '[{text: "None", value: ""}, {text: "Nofollow", value: "nofollow"}]';
552
- }
553
-
554
  if ( ! in_array( 'wp_adv', $this->toolbar_1, true ) ) {
555
  $init['wordpress_adv_hidden'] = false;
556
  }
@@ -560,11 +589,11 @@ class Tinymce_Advanced {
560
  $init['importcss_file_filter'] = 'editor-style.css';
561
  }
562
 
563
- if ( $this->check_setting( 'fontsize_formats' ) ) {
564
  $init['fontsize_formats'] = '8px 10px 12px 14px 16px 20px 24px 28px 32px 36px 48px 60px';
565
  }
566
 
567
- if ( $this->check_setting( 'paste_images' ) ) {
568
  $init['paste_data_images'] = true;
569
  }
570
 
@@ -582,41 +611,13 @@ class Tinymce_Advanced {
582
 
583
  ?>
584
  <script>
585
- ( function( tinymce ) {
586
- if ( ! tinymce ) {
587
- return;
588
- }
589
-
590
- var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
591
- '|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
592
- '|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary',
593
- tagOpenRe = new RegExp( '<(?:' + blocklist + ')(?: [^>]*)?>', 'gi' ),
594
- tagCloseRe = new RegExp( '</(?:' + blocklist + ')>', 'gi' ),
595
- $ = tinymce.$;
596
-
597
- function addLineBreaks( html ) {
598
- html = html.replace( tagOpenRe, '\n$&' );
599
- html = html.replace( tagCloseRe, '$&\n' );
600
- html = html.replace( /<br(?: [^>]*)?>/gi, '$&\n' );
601
- html = html.replace( />\n\n</g, '>\n<' );
602
- html = html.replace( /^<li/gm, '\t<li' );
603
-
604
- return tinymce.trim( html );
605
- }
606
-
607
- tinymce.each( $( '.wp-editor-wrap' ), function( element ) {
608
- var textarea, content;
609
-
610
- if ( $( element ).hasClass( 'html-active' ) ) {
611
- textarea = $( '.wp-editor-area', element )[0];
612
- content = textarea && textarea.value;
613
-
614
- if ( content && content.indexOf( '</p>' ) !== -1 && content.indexOf( '\n' ) === -1 ) {
615
- textarea.value = addLineBreaks( content );
616
- }
617
- }
618
- });
619
- }( window.tinymce ));
620
  </script>
621
  <?php
622
  }
@@ -634,11 +635,9 @@ class Tinymce_Advanced {
634
  $this->plugins = array();
635
  }
636
 
637
- if ( $this->check_admin_setting( 'no_autop' ) ) {
638
- $this->plugins[] = 'wptadv';
639
- }
640
 
641
- $this->plugins = array_intersect( $this->plugins, $this->all_plugins );
642
 
643
  $plugpath = TADV_URL . 'mce/';
644
  $mce_plugins = (array) $mce_plugins;
@@ -656,7 +655,7 @@ class Tinymce_Advanced {
656
  return $plugins;
657
  }
658
 
659
- if ( $this->check_setting('image') && ! in_array( 'image', $plugins, true ) ) {
660
  $plugins[] = 'image';
661
  }
662
 
@@ -708,6 +707,123 @@ class Tinymce_Advanced {
708
  return $_settings;
709
  }
710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
711
  public function settings_page() {
712
  if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
713
  define( 'TADV_ADMIN_PAGE', true );
3
  Plugin Name: TinyMCE Advanced
4
  Plugin URI: http://www.laptoptips.ca/projects/tinymce-advanced/
5
  Description: Enables advanced features and plugins in TinyMCE, the visual editor in WordPress.
6
+ Version: 4.4.1
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
  License: GPL2
24
  You should have received a copy of the GNU General Public License along
25
  with TinyMCE Advanced. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
26
 
27
+ Copyright (c) 2007-2016 Andrew Ozz. All rights reserved.
28
  */
29
 
30
  if ( ! class_exists('Tinymce_Advanced') ) :
31
 
32
  class Tinymce_Advanced {
33
 
34
+ private $required_version = '4.6-beta';
35
+ private $user_settings;
36
  private $admin_settings;
37
  private $admin_options;
38
  private $editor_id;
48
  private $all_buttons = array();
49
  private $buttons_filter = array();
50
 
51
+ private function get_default_user_settings() {
52
+ return array(
53
+ 'options' => 'menubar,advlist',
54
+ 'toolbar_1' => 'formatselect,bold,italic,blockquote,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,undo,redo',
55
+ 'toolbar_2' => 'fontselect,fontsizeselect,outdent,indent,pastetext,removeformat,charmap,wp_more,forecolor,table,wp_help',
56
+ 'toolbar_3' => '',
57
+ 'toolbar_4' => '',
58
+ 'plugins' => 'anchor,code,insertdatetime,nonbreaking,print,searchreplace,table,visualblocks,visualchars,advlist,wptadv',
59
+ );
60
+ }
61
+
62
+ private function get_default_admin_settings() {
63
+ return array(
64
+ 'options' => array(),
65
+ );
66
+ }
67
+
68
+ private function get_all_plugins() {
69
+ return array(
70
+ 'advlist',
71
+ 'anchor',
72
+ 'code',
73
+ 'contextmenu',
74
+ 'emoticons',
75
+ 'importcss',
76
+ 'insertdatetime',
77
+ 'link',
78
+ 'nonbreaking',
79
+ 'print',
80
+ 'searchreplace',
81
+ 'table',
82
+ 'visualblocks',
83
+ 'visualchars',
84
+ 'wptadv',
85
+ );
86
+ }
87
+
88
+ private function get_all_user_options() {
89
+ return array(
90
+ 'advlist',
91
+ 'advlink',
92
+ 'contextmenu',
93
+ 'menubar',
94
+ 'fontsize_formats',
95
+ );
96
+ }
97
+
98
+ private function get_all_admin_options() {
99
+ return array(
100
+ 'importcss',
101
+ 'no_autop',
102
+ 'paste_images',
103
+ );
104
+ }
105
+
106
+ private function get_editor_locations() {
107
+ return array(
108
+ 'edit_post_screen',
109
+ 'rest_of_wpadmin',
110
+ 'on_front_end',
111
+ );
112
+ }
113
 
114
  public function __construct() {
 
115
  if ( ! defined('ABSPATH') ) {
116
  return;
117
  }
118
 
119
+ register_activation_hook( __FILE__, array( $this, 'check_plugin_version' ) );
120
+
121
  add_action( 'plugins_loaded', array( $this, 'set_paths' ), 50 );
122
 
123
  if ( is_admin() ) {
235
  }
236
 
237
  public function load_settings() {
238
+ if ( empty( $this->admin_settings ) ) {
239
+ $this->admin_settings = get_option( 'tadv_admin_settings', false );
240
  }
241
 
242
+ if ( empty( $this->user_settings ) ) {
243
+ $this->user_settings = get_option( 'tadv_settings', false );
 
244
  }
245
 
246
  // load defaults if the options don't exist...
247
  if ( $this->admin_settings === false ) {
248
+ $this->admin_settings = $this->get_default_admin_settings();
249
  }
250
 
251
  $this->admin_options = ! empty( $this->admin_settings['options'] ) ? explode( ',', $this->admin_settings['options'] ) : array();
252
 
253
+ if ( $this->user_settings === false ) {
254
+ $this->user_settings = $this->get_default_user_settings();
255
  }
256
 
257
+ $this->options = ! empty( $this->user_settings['options'] ) ? explode( ',', $this->user_settings['options'] ) : array();
258
+ $this->plugins = ! empty( $this->user_settings['plugins'] ) ? explode( ',', $this->user_settings['plugins'] ) : array();
259
+ $this->toolbar_1 = ! empty( $this->user_settings['toolbar_1'] ) ? explode( ',', $this->user_settings['toolbar_1'] ) : array();
260
+ $this->toolbar_2 = ! empty( $this->user_settings['toolbar_2'] ) ? explode( ',', $this->user_settings['toolbar_2'] ) : array();
261
+ $this->toolbar_3 = ! empty( $this->user_settings['toolbar_3'] ) ? explode( ',', $this->user_settings['toolbar_3'] ) : array();
262
+ $this->toolbar_4 = ! empty( $this->user_settings['toolbar_4'] ) ? explode( ',', $this->user_settings['toolbar_4'] ) : array();
263
 
264
  $this->used_buttons = array_merge( $this->toolbar_1, $this->toolbar_2, $this->toolbar_3, $this->toolbar_4 );
265
  $this->get_all_buttons();
304
  return ( version_compare( $wp_version, $this->required_version, '>=' ) );
305
  }
306
 
307
+ public function check_plugin_version() {
308
  $version = get_option( 'tadv_version', 0 );
309
 
310
  if ( ! $version || $version < 4000 ) {
311
  // First install or upgrade to TinyMCE 4.0
312
+ $this->user_settings = $this->get_default_user_settings();
313
+ $this->admin_settings = $this->get_default_admin_settings();
314
 
315
+ update_option( 'tadv_settings', $this->user_settings );
316
  update_option( 'tadv_admin_settings', $this->admin_settings );
317
  update_option( 'tadv_version', 4000 );
318
  }
438
  if ( in_array( 'searchreplace', $this->used_buttons, true ) )
439
  $plugins[] = 'searchreplace';
440
 
441
+ // if ( in_array( 'insertlayer', $this->used_buttons, true ) )
442
+ // $plugins[] = 'layer';
443
 
444
  // From options
445
+ if ( $this->check_user_setting( 'advlist' ) )
446
  $plugins[] = 'advlist';
447
 
448
+ if ( $this->check_user_setting( 'advlink' ) )
449
  $plugins[] = 'link';
450
 
451
  if ( $this->check_admin_setting( 'importcss' ) )
452
  $plugins[] = 'importcss';
453
 
454
+ if ( $this->check_user_setting( 'contextmenu' ) )
455
  $plugins[] = 'contextmenu';
456
 
457
  // add/remove used plugins
460
  return array_unique( $plugins );
461
  }
462
 
463
+ private function check_user_setting( $setting ) {
464
  if ( ! is_array( $this->options ) ) {
465
  $this->load_settings();
466
  }
567
  return $init;
568
  }
569
 
570
+ $init['image_advtab'] = true;
571
+ $init['rel_list'] = '[{text: "None", value: ""}, {text: "Nofollow", value: "nofollow"}]';
572
+
573
  if ( $this->check_admin_setting( 'no_autop' ) ) {
574
  $init['wpautop'] = false;
575
  // $init['indent'] = true;
576
  $init['tadv_noautop'] = true;
577
  }
578
 
579
+ if ( $this->check_user_setting('menubar') ) {
580
  $init['menubar'] = true;
581
  }
582
 
 
 
 
 
 
 
 
 
583
  if ( ! in_array( 'wp_adv', $this->toolbar_1, true ) ) {
584
  $init['wordpress_adv_hidden'] = false;
585
  }
589
  $init['importcss_file_filter'] = 'editor-style.css';
590
  }
591
 
592
+ if ( $this->check_user_setting( 'fontsize_formats' ) ) {
593
  $init['fontsize_formats'] = '8px 10px 12px 14px 16px 20px 24px 28px 32px 36px 48px 60px';
594
  }
595
 
596
+ if ( $this->check_user_setting( 'paste_images' ) ) {
597
  $init['paste_data_images'] = true;
598
  }
599
 
611
 
612
  ?>
613
  <script>
614
+ !function(a,b){"undefined"!=typeof a&&"undefined"!=typeof b&&a(function(){b.addButton("sofbg-axcell","&para;",function(b,c){
615
+ var d=a(c),e=a.trim(d.val()),f="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|" +
616
+ "address|math|style|p|h[1-6]|hr|fieldset|legend|tmadv|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary";
617
+ -1!==e.indexOf("</p>")&&-1===e.indexOf("\n\n")&&(e=e.replace(new RegExp("<(?:"+f+")(?: [^>]*)?>","gi"),"\n$&"),
618
+ e=e.replace(new RegExp("</(?:"+f+")>","gi"),"$&\n"),e=e.replace(/(<br(?: [^>]*)?>)[\r\n\t]*/gi,"$1\n"),
619
+ e=e.replace(/>\n[\r\n\t]+</g,">\n<"),e=e.replace(/^<li/gm," <li"),e=e.replace(/<td>\u00a0<\/td>/g,"<td>&nbsp;</td>"),
620
+ d.val(a.trim(e)))},"","","Fix line breaks")})}(window.jQuery,window.QTags);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
  </script>
622
  <?php
623
  }
635
  $this->plugins = array();
636
  }
637
 
638
+ $this->plugins[] = 'wptadv';
 
 
639
 
640
+ $this->plugins = array_intersect( $this->plugins, $this->get_all_plugins() );
641
 
642
  $plugpath = TADV_URL . 'mce/';
643
  $mce_plugins = (array) $mce_plugins;
655
  return $plugins;
656
  }
657
 
658
+ if ( in_array( 'image', $this->used_buttons, true ) && ! in_array( 'image', $plugins, true ) ) {
659
  $plugins[] = 'image';
660
  }
661
 
707
  return $_settings;
708
  }
709
 
710
+ private function validate_settings( $settings, $checklist ) {
711
+ if ( empty( $settings ) ) {
712
+ return '';
713
+ } elseif ( is_string( $settings ) ) {
714
+ $settings = explode( ',', $settings );
715
+ } elseif ( ! is_array( $settings ) ) {
716
+ return '';
717
+ }
718
+
719
+ $_settings = array();
720
+
721
+ foreach ( $settings as $value ) {
722
+ if ( in_array( $value, $checklist, true ) ) {
723
+ $_settings[] = $value;
724
+ }
725
+ }
726
+
727
+ return implode( ',', $_settings );
728
+ }
729
+
730
+ private function save_settings( $all_settings = null ) {
731
+ $settings = $user_settings = array();
732
+
733
+ if ( empty( $this->buttons_filter ) ) {
734
+ $this->get_all_buttons();
735
+ }
736
+
737
+ if ( ! empty( $all_settings['settings'] ) ) {
738
+ $user_settings = $all_settings['settings'];
739
+ }
740
+
741
+ for ( $i = 1; $i < 5; $i++ ) {
742
+ $toolbar_name = 'toolbar_' . $i;
743
+
744
+ if ( ! empty( $user_settings[ $toolbar_name ] ) ) {
745
+ $toolbar = explode( ',', $user_settings[ $toolbar_name ] );
746
+ } elseif ( ! empty( $_POST[ $toolbar_name ] ) && is_array( $_POST[ $toolbar_name ] ) ) {
747
+ $toolbar = $_POST[ $toolbar_name ];
748
+ } else {
749
+ $toolbar = array();
750
+ }
751
+
752
+ if ( $i > 1 && ( $wp_adv = array_search( 'wp_adv', $toolbar ) ) !== false ) {
753
+ unset( $toolbar[ $wp_adv ] );
754
+ }
755
+
756
+ $settings[ $toolbar_name ] = $this->validate_settings( $toolbar, $this->buttons_filter );
757
+ }
758
+
759
+ if ( ! empty( $user_settings['options'] ) ) {
760
+ $options = explode( ',', $user_settings['options'] );
761
+ } elseif ( ! empty( $_POST['options'] ) && is_array( $_POST['options'] ) ) {
762
+ $options = $_POST['options'];
763
+ } else {
764
+ $options = array();
765
+ }
766
+
767
+ $settings['options'] = $this->validate_settings( $options, $this->get_all_user_options() );
768
+
769
+ if ( ! empty( $user_settings['plugins'] ) ) {
770
+ $plugins = explode( ',', $user_settings['plugins'] );
771
+ } elseif ( ! empty( $_POST['options']['menubar'] ) ) {
772
+ $plugins = array( 'anchor', 'code', 'insertdatetime', 'nonbreaking', 'print', 'searchreplace', 'table', 'visualblocks', 'visualchars' );
773
+ } else {
774
+ $plugins = array();
775
+ }
776
+
777
+ // Merge the submitted plugins with plugins needed for the buttons.
778
+ $this->user_settings = $settings;
779
+ $this->load_settings();
780
+ $plugins = $this->get_plugins( $plugins );
781
+
782
+ $settings['plugins'] = $this->validate_settings( $plugins, $this->get_all_plugins() );
783
+
784
+ $this->user_settings = $settings;
785
+ $this->load_settings();
786
+
787
+ // Save the new settings.
788
+ update_option( 'tadv_settings', $settings );
789
+
790
+ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
791
+ $this->save_admin_settings( $all_settings );
792
+ }
793
+ }
794
+
795
+ private function save_admin_settings( $all_settings = null ) {
796
+ $admin_settings = $save_admin_settings = array();
797
+
798
+ if ( ! empty( $all_settings['admin_settings'] ) ) {
799
+ $admin_settings = $all_settings['admin_settings'];
800
+ }
801
+
802
+ if ( ! empty( $admin_settings ) ) {
803
+ $save_admin_settings['options'] = $this->validate_settings( $admin_settings['options'], $this->get_all_admin_options() );
804
+ $disabled_editors = array_intersect( $this->get_editor_locations(), explode( ',', $admin_settings['disabled_editors'] ) );
805
+ } elseif ( isset( $_POST['tadv-save'] ) ) {
806
+ if ( ! empty( $_POST['admin_options'] ) && is_array( $_POST['admin_options'] ) ) {
807
+ $save_admin_settings['options'] = $this->validate_settings( $_POST['admin_options'], $this->get_all_admin_options() );
808
+ }
809
+
810
+ if ( ! empty( $_POST['tadv_enable_at'] ) && is_array( $_POST['tadv_enable_at'] ) ) {
811
+ $tadv_enable_at = $_POST['tadv_enable_at'];
812
+ } else {
813
+ $tadv_enable_at = array();
814
+ }
815
+
816
+ $disabled_editors = array_diff( $this->get_editor_locations(), $tadv_enable_at );
817
+ } else {
818
+ return;
819
+ }
820
+
821
+ $save_admin_settings['disabled_editors'] = implode( ',', $disabled_editors );
822
+
823
+ $this->admin_settings = $save_admin_settings;
824
+ update_option( 'tadv_admin_settings', $save_admin_settings );
825
+ }
826
+
827
  public function settings_page() {
828
  if ( ! defined( 'TADV_ADMIN_PAGE' ) ) {
829
  define( 'TADV_ADMIN_PAGE', true );