TinyMCE Advanced - Version 4.1.9

Version Description

  • Updated for WordPress 4.2 and TinyMCE 4.1.9.
  • Fixed bugs with showing oEmbed previews when pasting an URL.
  • Fixed bugs with getting the content from TinyMCE with line breaks.
Download this release

Release Info

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

Code changes from version 4.1.7 to 4.1.9

css/tadv-styles.css CHANGED
@@ -176,6 +176,7 @@ ul.container,
176
 
177
  .tadvdropzone .tadvmodule .tadvitem:hover {
178
  border-color: #999;
 
179
  }
180
 
181
  .tadvdropzone ul {
176
 
177
  .tadvdropzone .tadvmodule .tadvitem:hover {
178
  border-color: #999;
179
+ background-image: none;
180
  }
181
 
182
  .tadvdropzone ul {
langs/tinymce-advanced-ar.mo ADDED
Binary file
langs/tinymce-advanced-ar.po ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: TinyMCE Advanced\n"
4
+ "POT-Creation-Date: 2015-04-02 17:49-0800\n"
5
+ "PO-Revision-Date: 2015-04-02 18:01-0800\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "Language: en_US\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:128
22
+ msgid "Default settings restored."
23
+ msgstr "تمت استعادة الاعدادات الافتراضية."
24
+
25
+ #: ../tadv_admin.php:137
26
+ msgid "TinyMCE Advanced Settings Export"
27
+ msgstr "TinyMCE Advanced تصدير اعدادات"
28
+
29
+ #: ../tadv_admin.php:141
30
+ msgid "The settings are exported as a JSON encoded string."
31
+ msgstr "الاعدادات قد تم تصديرها JSON كسلسلة مشفرة."
32
+
33
+ #: ../tadv_admin.php:142
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
+ "الرجاء انسخ المحتوى وواحفظه في ملف<b>.txt</b> , استخدم محرر بسيط مثل نوتباد."
39
+
40
+ #: ../tadv_admin.php:143
41
+ msgid ""
42
+ "It is important that the export is not changed in any way, no spaces, line "
43
+ "breaks, etc."
44
+ msgstr ""
45
+ "من المهم ان لايتم تعديل التصدير بأي طريقة , لامسافات , خطوط فارغة , الخ"
46
+
47
+ #: ../tadv_admin.php:148
48
+ msgid "Select All"
49
+ msgstr "تحديد الكل"
50
+
51
+ #: ../tadv_admin.php:150 ../tadv_admin.php:174
52
+ msgid "Back to Editor Settings"
53
+ msgstr "العودة الى اعدادات الحرر"
54
+
55
+ #: ../tadv_admin.php:160
56
+ msgid "TinyMCE Advanced Settings Import"
57
+ msgstr "TinyMCE Advanced إستيراد إعدادات"
58
+
59
+ #: ../tadv_admin.php:163
60
+ msgid ""
61
+ "The settings are imported from a JSON encoded string. Please paste the "
62
+ "exported string in the text area below."
63
+ msgstr ""
64
+ "الاعدادات مستوردة من JSON سلسلة مشفرة ,الرجاء الصاق السلسلة المصدرة في "
65
+ "منطقة النص ادناه."
66
+
67
+ #: ../tadv_admin.php:168
68
+ msgid "Verify"
69
+ msgstr "تحقق"
70
+
71
+ #: ../tadv_admin.php:169
72
+ msgid "Import"
73
+ msgstr "إستيراد"
74
+
75
+ #: ../tadv_admin.php:196
76
+ msgid "Importing of settings failed."
77
+ msgstr "إستيراد الاعدادات فشل."
78
+
79
+ #: ../tadv_admin.php:221
80
+ msgid "ERROR: All toolbars are empty. Default settings loaded."
81
+ msgstr "خطأ: جميع الاشرطة فارغة. الاعدادات الافتراضية ارجعت."
82
+
83
+ #: ../tadv_admin.php:233
84
+ msgid "Editor Settings"
85
+ msgstr "إعدادات المحرر"
86
+
87
+ #: ../tadv_admin.php:244
88
+ #, php-format
89
+ msgid ""
90
+ "This plugin requires WordPress version %1$s or newer. It appears that you "
91
+ "are running %2$s. This can make the editor unstable."
92
+ msgstr ""
93
+ "This plugin requires WordPress version %1$s or newer. It appears that you "
94
+ "are running %2$s. This can make the editor unstable."
95
+
96
+ #: ../tadv_admin.php:251
97
+ #, php-format
98
+ msgid ""
99
+ "Please upgrade your WordPress installation or download an <a href=\"%s"
100
+ "\">older version of the plugin</a>."
101
+ msgstr ""
102
+ "Please upgrade your WordPress installation or download an <a href=\"%s"
103
+ "\">older version of the plugin</a>."
104
+
105
+ #: ../tadv_admin.php:261
106
+ msgid "Settings saved."
107
+ msgstr "الاعدادات حفظت."
108
+
109
+ #: ../tadv_admin.php:270 ../tadv_admin.php:534
110
+ msgid "Save Changes"
111
+ msgstr "حفظ التغييرات"
112
+
113
+ #: ../tadv_admin.php:275
114
+ msgid ""
115
+ "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
116
+ "most buttons are also available as menu items."
117
+ msgstr ""
118
+ "جديد قائمة المحرر في TinyMCE 4.0/WordPress 3.9 , عند تفعيلها , اغلب الازرار "
119
+ "متاحة في القائمة."
120
+
121
+ #: ../tadv_admin.php:279
122
+ msgid "Enable the editor menu."
123
+ msgstr "تفعيل قائمة المحرر."
124
+
125
+ #: ../tadv_admin.php:391
126
+ msgid ""
127
+ "Drag buttons from the unused buttons below and drop them in the toolbars "
128
+ "above, or drag the buttons in the toolbars to rearrange them."
129
+ msgstr ""
130
+ "اسحب الازرار من منطقة الازرار الغير مستخدمة في الاسفل وافلتها في الشريط "
131
+ "العلوي , او اسحب الازرار من الشريط لاعادة ترتيبهم."
132
+
133
+ #: ../tadv_admin.php:394
134
+ msgid "Unused Buttons"
135
+ msgstr "الازرار الغير مستخدمة"
136
+
137
+ #: ../tadv_admin.php:435
138
+ msgid "Also enable:"
139
+ msgstr "فعل ايضا:"
140
+
141
+ #: ../tadv_admin.php:438
142
+ msgid "List Style Options"
143
+ msgstr "قائمة خيارات الشكل"
144
+
145
+ #: ../tadv_admin.php:443
146
+ msgid "Context Menu"
147
+ msgstr "حالة القائمة"
148
+
149
+ #: ../tadv_admin.php:448
150
+ msgid "Link (replaces the Insert/Edit Link dialog)"
151
+ msgstr "رابط (استبدال المدرج/تعديل رابط الحوار)"
152
+
153
+ #: ../tadv_admin.php:458
154
+ msgid "Advanced Options"
155
+ msgstr "خيارات متقدمة"
156
+
157
+ #: ../tadv_admin.php:466
158
+ msgid "Import editor-style.css."
159
+ msgstr "استيراد ملفeditor-style.css."
160
+
161
+ #: ../tadv_admin.php:468
162
+ msgid "It seems your theme does not support customised styles for the editor."
163
+ msgstr "يبدو ان قالبك لايدعم الستايل المخصص للمحرر."
164
+
165
+ #: ../tadv_admin.php:469
166
+ msgid ""
167
+ "You can create a CSS file named <code>editor-style.css</code> and upload it "
168
+ "to your theme's directory."
169
+ msgstr ""
170
+ "تستطيع انشاء ملف CSS بأسم <code>editor-style.css</code> ورفعه الى مسار الثيم "
171
+ "الخاص بك."
172
+
173
+ #: ../tadv_admin.php:470
174
+ msgid "After that, enable this setting."
175
+ msgstr "بعد ذلك, فعل هذا"
176
+
177
+ #: ../tadv_admin.php:479
178
+ msgid ""
179
+ "Load the CSS classes used in editor-style.css and replace the Formats button "
180
+ "and sub-menu."
181
+ msgstr ""
182
+ "استخدم كلاسات css المستخدمة في ملف editor-style.css , و استبدل زر الصيغ "
183
+ "والقائمة الفرعية."
184
+
185
+ #: ../tadv_admin.php:484
186
+ msgid "Markdown typing support (text pattern plugin)"
187
+ msgstr "دعم تنسيق الكتابة ( اضافة اسلوب النص )"
188
+
189
+ #: ../tadv_admin.php:486
190
+ msgid ""
191
+ "This plugin matches special patterns while you type and applies formats or "
192
+ "executes commands on the matched text."
193
+ msgstr "هذه الاضافة "
194
+
195
+ #: ../tadv_admin.php:487
196
+ msgid ""
197
+ "The default patterns are the same as the markdown syntax so you can type "
198
+ "<code># text</code> to create a header, <code>1. text</code> to create a "
199
+ "list, <code>**text**</code> to make it bold, etc."
200
+ msgstr ""
201
+ "الاساليب الافتراضية هي نفسها الموجودة في markdown syntax لذا يمكنك كتابة "
202
+ "<code># text</code> لإنشاء هيدر , <code>1. text</code> لإنشاء قائمة ,"
203
+ "<code>**text**</code> لجعله سميك , الخ"
204
+
205
+ #: ../tadv_admin.php:488
206
+ msgid "More information"
207
+ msgstr "معلومات اكثر"
208
+
209
+ #: ../tadv_admin.php:494
210
+ msgid ""
211
+ "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
212
+ "in the Text editor"
213
+ msgstr "ايقاف حذف وسم &lt;p&gt; و &lt;br /&gt; عند الحفظ وعرضهم في محرر النصوص"
214
+
215
+ # تحتاج مراجعة
216
+ #: ../tadv_admin.php:496
217
+ msgid ""
218
+ "This will make it possible to use more advanced coding in the HTML editor "
219
+ "without the back-end filtering affecting it much."
220
+ msgstr ""
221
+ "هذه سوف تتيح لك استخدام HTML اكثر تقدما بدون فلاتر ومؤثرات برمجية كثيرة."
222
+
223
+ #: ../tadv_admin.php:497
224
+ msgid ""
225
+ "However it may behave unexpectedly in rare cases, so test it thoroughly "
226
+ "before enabling it permanently."
227
+ msgstr ""
228
+ "على اية حال انه تصرف مفاجئ في حالات نادرة , لذا قم بتجربته بشكل كامل قبل "
229
+ "تضمينه."
230
+
231
+ #: ../tadv_admin.php:498
232
+ msgid ""
233
+ "Line breaks in the HTML editor would still affect the output, in particular "
234
+ "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
235
+ "&gt; tags."
236
+ msgstr ""
237
+ "الخطوط الفارغة في محرر HTML سوف تؤثر في الاخراج . لذا لاتستخدم خطوط فارغة "
238
+ "داخل وسوم HTML او تعدد وسوم &lt;br /&gt; ."
239
+
240
+ #: ../tadv_admin.php:504
241
+ msgid "Replace font size settings"
242
+ msgstr " استبداال خيارات حجم الخط"
243
+
244
+ #: ../tadv_admin.php:505
245
+ msgid ""
246
+ "Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px "
247
+ "20px 24px 28px 32px 36px."
248
+ msgstr ""
249
+ "استبدل خيار حجم الخطوط مع :8px 10px 12px 14px 16px 20px 24px 28px 32px 36px."
250
+
251
+ #: ../tadv_admin.php:510
252
+ msgid "Enable pasting of image source"
253
+ msgstr "تفعيل اللصق بمصدر الصورة"
254
+
255
+ #: ../tadv_admin.php:512
256
+ msgid ""
257
+ "Works only in Firefox and Safari. These browsers support pasting of images "
258
+ "directly in the editor and convert them to base64 encoded text."
259
+ msgstr ""
260
+ "تعمل فقط على فايرفوكس و سفاري. هؤلاء المتصفحات يدعمون لصق الصور مباشرة في "
261
+ "المحرر و تحويلها الى base64 نص مشفر."
262
+
263
+ #: ../tadv_admin.php:513
264
+ msgid ""
265
+ "This is not acceptable for larger images like photos or graphics, but may be "
266
+ "useful in some cases for very small images like icons, not larger than 2-3KB."
267
+ msgstr ""
268
+ "هذه غير متوافقة للصور الكبير مثل الصور الفوتوغرافية , ولكنها مفيدة لالصور "
269
+ "الصغيرة كالايقونات , ليست اكبر من 2-3 كيلوبايت"
270
+
271
+ #: ../tadv_admin.php:514
272
+ msgid "These images will not be available in the Media Library."
273
+ msgstr "لن تكون هذه الصور متاحة في مكتبة الوسائط."
274
+
275
+ #: ../tadv_admin.php:520
276
+ msgid "Administration"
277
+ msgstr "الادارة"
278
+
279
+ #: ../tadv_admin.php:522
280
+ msgid "Export Settings"
281
+ msgstr "تصدير الاعدادات"
282
+
283
+ #: ../tadv_admin.php:523
284
+ msgid "Import Settings"
285
+ msgstr "استيراد الاعدادات"
286
+
287
+ #: ../tadv_admin.php:533
288
+ msgid "Restore Default Settings"
289
+ msgstr "استعادة الاعدادات الافتراضية"
290
+
291
+ #: ../tadv_admin.php:539
292
+ msgid ""
293
+ "The [Toolbar toggle] button shows or hides the second, third, and forth "
294
+ "button rows. It will only work when it is in the first row and there are "
295
+ "buttons in the second row."
296
+ msgstr ""
297
+ "زر شريط التبديل يعرض او يخفي صف الازرار الثاني ,الثالث وصاعدا. سيعمل فقط "
298
+ "عندما يكون في اول صف و الازرار في ثاني صف."
langs/tinymce-advanced-de_DE.mo ADDED
Binary file
langs/tinymce-advanced-de_DE.po ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: TinyMCE Advanced 4.1.7\n"
4
+ "POT-Creation-Date: 2015-04-02 17:49-0800\n"
5
+ "PO-Revision-Date: 2015-04-02 18:03-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:128
22
+ msgid "Default settings restored."
23
+ msgstr "Standardeinstellungen wiederhergestellt."
24
+
25
+ #: ../tadv_admin.php:137
26
+ msgid "TinyMCE Advanced Settings Export"
27
+ msgstr "TinyMCE Advanced Einstellungen exportieren"
28
+
29
+ #: ../tadv_admin.php:141
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:142
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:143
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:148
50
+ msgid "Select All"
51
+ msgstr "Alles auswählen"
52
+
53
+ #: ../tadv_admin.php:150 ../tadv_admin.php:174
54
+ msgid "Back to Editor Settings"
55
+ msgstr "Zurück zu Editor Einstellungen"
56
+
57
+ #: ../tadv_admin.php:160
58
+ msgid "TinyMCE Advanced Settings Import"
59
+ msgstr "TinyMCE Advanced Einstellungen importieren"
60
+
61
+ #: ../tadv_admin.php:163
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:168
70
+ msgid "Verify"
71
+ msgstr "Verifizieren"
72
+
73
+ #: ../tadv_admin.php:169
74
+ msgid "Import"
75
+ msgstr "Importieren"
76
+
77
+ #: ../tadv_admin.php:196
78
+ msgid "Importing of settings failed."
79
+ msgstr "Importieren von Einstellungen fehlgeschlagen."
80
+
81
+ #: ../tadv_admin.php:221
82
+ msgid "ERROR: All toolbars are empty. Default settings loaded."
83
+ msgstr "FEHLER: Alle Symbolleisten sind leer. Standardeinstellungen geladen."
84
+
85
+ #: ../tadv_admin.php:233
86
+ msgid "Editor Settings"
87
+ msgstr "Editor Einstellungen"
88
+
89
+ #: ../tadv_admin.php:244
90
+ #, php-format
91
+ msgid ""
92
+ "This plugin requires WordPress version %1$s or newer. It appears that you "
93
+ "are running %2$s. This can make the editor unstable."
94
+ msgstr ""
95
+ "This plugin requires WordPress version %1$s or newer. It appears that you "
96
+ "are running %2$s. This can make the editor unstable."
97
+
98
+ #: ../tadv_admin.php:251
99
+ #, php-format
100
+ msgid ""
101
+ "Please upgrade your WordPress installation or download an <a href=\"%s"
102
+ "\">older version of the plugin</a>."
103
+ msgstr ""
104
+ "Bitte aktualisiere deine WordPress Installation oder lade eine <a href=\"%s"
105
+ "\"> ältere Version des Plugins</a> herunter."
106
+
107
+ #: ../tadv_admin.php:261
108
+ msgid "Settings saved."
109
+ msgstr "Einstellungen gespeichert."
110
+
111
+ #: ../tadv_admin.php:270 ../tadv_admin.php:534
112
+ msgid "Save Changes"
113
+ msgstr "Änderungen speichern"
114
+
115
+ #: ../tadv_admin.php:275
116
+ msgid ""
117
+ "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
118
+ "most buttons are also available as menu items."
119
+ msgstr ""
120
+ "Neu in TinyMCE 4.0/WordPress 3.9 ist das Editor-Menü. Wenn es aktiviert ist, "
121
+ "sind die meisten Buttons auch als Menüeinträge verfügbar."
122
+
123
+ #: ../tadv_admin.php:279
124
+ msgid "Enable the editor menu."
125
+ msgstr "Aktiviere das Editor-Menü."
126
+
127
+ #: ../tadv_admin.php:391
128
+ msgid ""
129
+ "Drag buttons from the unused buttons below and drop them in the toolbars "
130
+ "above, or drag the buttons in the toolbars to rearrange them."
131
+ msgstr ""
132
+ "Ziehe den Button aus den nicht benutzten Buttons unterhalb und lege diesen "
133
+ "in die Symbolleiste oberhalb ab, oder ziehe den Button in den Symbolleisten, "
134
+ "um sie neu anzuordnen."
135
+
136
+ #: ../tadv_admin.php:394
137
+ msgid "Unused Buttons"
138
+ msgstr "Unbenutzte Buttons"
139
+
140
+ #: ../tadv_admin.php:435
141
+ msgid "Also enable:"
142
+ msgstr "Auch aktivierbar:"
143
+
144
+ #: ../tadv_admin.php:438
145
+ msgid "List Style Options"
146
+ msgstr "Listenstil Optionen"
147
+
148
+ #: ../tadv_admin.php:443
149
+ msgid "Context Menu"
150
+ msgstr "Kontextmenu"
151
+
152
+ #: ../tadv_admin.php:448
153
+ msgid "Link (replaces the Insert/Edit Link dialog)"
154
+ msgstr "Link (ersetzt den Einfügen/Bearbeiten Link Dialog)"
155
+
156
+ #: ../tadv_admin.php:458
157
+ msgid "Advanced Options"
158
+ msgstr "Erweiterte Optionen"
159
+
160
+ #: ../tadv_admin.php:466
161
+ msgid "Import editor-style.css."
162
+ msgstr "Importiere editor-style.css."
163
+
164
+ #: ../tadv_admin.php:468
165
+ msgid "It seems your theme does not support customised styles for the editor."
166
+ msgstr ""
167
+ "Es scheint, dass dein Theme individuelle Stile für den Editor nicht "
168
+ "unterstützt."
169
+
170
+ #: ../tadv_admin.php:469
171
+ msgid ""
172
+ "You can create a CSS file named <code>editor-style.css</code> and upload it "
173
+ "to your theme's directory."
174
+ msgstr ""
175
+ "Du kannst eine CSS-Datei namens <code>editor-style.css</code> erstellen und "
176
+ "in dein Theme Verzeichnis hochladen."
177
+
178
+ #: ../tadv_admin.php:470
179
+ msgid "After that, enable this setting."
180
+ msgstr "Danach aktiviere diese Einstellung."
181
+
182
+ #: ../tadv_admin.php:479
183
+ msgid ""
184
+ "Load the CSS classes used in editor-style.css and replace the Formats button "
185
+ "and sub-menu."
186
+ msgstr ""
187
+ "Lade die verwendeten CSS Klassen aus editor-style.css und ersetze die "
188
+ "Formate von Buttons und Untermenü."
189
+
190
+ #: ../tadv_admin.php:484
191
+ msgid "Markdown typing support (text pattern plugin)"
192
+ msgstr "Markdown Eingabe Unterstützung (Textmuster Plugin)"
193
+
194
+ #: ../tadv_admin.php:486
195
+ msgid ""
196
+ "This plugin matches special patterns while you type and applies formats or "
197
+ "executes commands on the matched text."
198
+ msgstr ""
199
+ "Dieses Plugin passt spezielle Muster an, während Du tippst und wendet "
200
+ "Formate an oder führt Befehle in dem gefundenen Text aus."
201
+
202
+ #: ../tadv_admin.php:487
203
+ msgid ""
204
+ "The default patterns are the same as the markdown syntax so you can type "
205
+ "<code># text</code> to create a header, <code>1. text</code> to create a "
206
+ "list, <code>**text**</code> to make it bold, etc."
207
+ msgstr ""
208
+ "Die Standardmuster sind die gleichen wie beim Markdown-Syntax daher kannst "
209
+ "Du eingeben <code># text</code> zum Erstellen einer Kopfzeile <code>1. text</"
210
+ "code> zum Erstellen einer Liste <code>**text**</code> um es Fett machen, etc."
211
+
212
+ #: ../tadv_admin.php:488
213
+ msgid "More information"
214
+ msgstr "Weitere Informationen"
215
+
216
+ #: ../tadv_admin.php:494
217
+ msgid ""
218
+ "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
219
+ "in the Text editor"
220
+ msgstr ""
221
+ "Stoppe das Entfernen der &lt;p&gt; and &lt;br /&gt; Tags beim Speichern und "
222
+ "zeige diese in dem Texteditor."
223
+
224
+ #: ../tadv_admin.php:496
225
+ msgid ""
226
+ "This will make it possible to use more advanced coding in the HTML editor "
227
+ "without the back-end filtering affecting it much."
228
+ msgstr ""
229
+ "Dadurch wird es möglich, erweiterte Codierung im HTML-Editor zu verwenden "
230
+ "ohne das die Backend-Filterung viel beeinflusst."
231
+
232
+ #: ../tadv_admin.php:497
233
+ msgid ""
234
+ "However it may behave unexpectedly in rare cases, so test it thoroughly "
235
+ "before enabling it permanently."
236
+ msgstr ""
237
+ "Aber es kann in seltenen Fällen unerwartet reagieren, also teste es "
238
+ "gründlich bevor Du es dauerhaft aktivierst."
239
+
240
+ #: ../tadv_admin.php:498
241
+ msgid ""
242
+ "Line breaks in the HTML editor would still affect the output, in particular "
243
+ "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
244
+ "&gt; tags."
245
+ msgstr ""
246
+ "Zeilenumbrüche in dem HTML-Editor würden immer noch die Ausgabe "
247
+ "beeinflussen, insbesondere verwende keine Leerzeilen, Zeilenumbrüche "
248
+ "innerhalb von HTML Tags oder mehrere &lt;br /&gt; Tags."
249
+
250
+ #: ../tadv_admin.php:504
251
+ msgid "Replace font size settings"
252
+ msgstr "Ersetze Schriftgrößen Einstellungen"
253
+
254
+ #: ../tadv_admin.php:505
255
+ msgid ""
256
+ "Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px "
257
+ "20px 24px 28px 32px 36px."
258
+ msgstr ""
259
+ "Ersetzt die Größeneinstellung für verfügbare Schriften mit: 8px 10px 12px "
260
+ "14px 16px 20px 24px 28px 32px 36px."
261
+
262
+ #: ../tadv_admin.php:510
263
+ msgid "Enable pasting of image source"
264
+ msgstr "Aktiviere Einfügen von Bildquelle"
265
+
266
+ #: ../tadv_admin.php:512
267
+ msgid ""
268
+ "Works only in Firefox and Safari. These browsers support pasting of images "
269
+ "directly in the editor and convert them to base64 encoded text."
270
+ msgstr ""
271
+ "Funktioniert nur in Firefox und Safari. Diese Browser unterstützen Einfügen "
272
+ "von Bildern direkt im Editor und konvertieren dies zu base64 codierten Text."
273
+
274
+ #: ../tadv_admin.php:513
275
+ msgid ""
276
+ "This is not acceptable for larger images like photos or graphics, but may be "
277
+ "useful in some cases for very small images like icons, not larger than 2-3KB."
278
+ msgstr ""
279
+ "Dies ist nicht akzeptabel für größere Bilder wie Fotos oder Grafiken, aber "
280
+ "kann in einigen Fällen für sehr kleine Bilder wie Icons nützlich sein, nicht "
281
+ "größer als 2-3KB."
282
+
283
+ #: ../tadv_admin.php:514
284
+ msgid "These images will not be available in the Media Library."
285
+ msgstr "Diese Bilder werden nicht in der Medienbibliothek verfügbar sein."
286
+
287
+ #: ../tadv_admin.php:520
288
+ msgid "Administration"
289
+ msgstr "Administration"
290
+
291
+ #: ../tadv_admin.php:522
292
+ msgid "Export Settings"
293
+ msgstr "Einstellungen exportieren"
294
+
295
+ #: ../tadv_admin.php:523
296
+ msgid "Import Settings"
297
+ msgstr "Einstellungen importieren"
298
+
299
+ #: ../tadv_admin.php:533
300
+ msgid "Restore Default Settings"
301
+ msgstr "Standardeinstellungen wiederherstellen"
302
+
303
+ #: ../tadv_admin.php:539
304
+ msgid ""
305
+ "The [Toolbar toggle] button shows or hides the second, third, and forth "
306
+ "button rows. It will only work when it is in the first row and there are "
307
+ "buttons in the second row."
308
+ msgstr ""
309
+ "Der [Werkzeugleisten] Button zeigt oder verbirgt die zweite, dritte oder "
310
+ "vierte Button Reihe. Er wird nur funktionieren, wenn er in der ersten Reihe "
311
+ "ist und Buttons sich in der zweiten Reihe befinden."
langs/tinymce-advanced-pl_PL.mo ADDED
Binary file
langs/tinymce-advanced-pl_PL.po ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: TinyMCE Advanced\n"
4
+ "POT-Creation-Date: 2015-04-02 17:49-0800\n"
5
+ "PO-Revision-Date: 2015-04-02 18:04-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:128
23
+ msgid "Default settings restored."
24
+ msgstr "Domyślne ustawienia przywrócone."
25
+
26
+ #: ../tadv_admin.php:137
27
+ msgid "TinyMCE Advanced Settings Export"
28
+ msgstr "Eksport Ustawień TinyMCE Advanced"
29
+
30
+ #: ../tadv_admin.php:141
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:142
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:143
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:148
51
+ msgid "Select All"
52
+ msgstr "Wybierz Wszystko"
53
+
54
+ #: ../tadv_admin.php:150 ../tadv_admin.php:174
55
+ msgid "Back to Editor Settings"
56
+ msgstr "Powrót do Ustawień Edytora"
57
+
58
+ #: ../tadv_admin.php:160
59
+ msgid "TinyMCE Advanced Settings Import"
60
+ msgstr "Import Ustawień TinyMCE Advanced"
61
+
62
+ #: ../tadv_admin.php:163
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:168
71
+ msgid "Verify"
72
+ msgstr "Zweryfikuj"
73
+
74
+ #: ../tadv_admin.php:169
75
+ msgid "Import"
76
+ msgstr "Importuj"
77
+
78
+ #: ../tadv_admin.php:196
79
+ msgid "Importing of settings failed."
80
+ msgstr "Importowanie ustawień nie powiodło się."
81
+
82
+ #: ../tadv_admin.php:221
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:233
88
+ msgid "Editor Settings"
89
+ msgstr "Ustawienia Edytora"
90
+
91
+ #: ../tadv_admin.php:244
92
+ #, php-format
93
+ msgid ""
94
+ "This plugin requires WordPress version %1$s or newer. It appears that you "
95
+ "are running %2$s. This can make the editor unstable."
96
+ msgstr ""
97
+ "This plugin requires WordPress version %1$s or newer. It appears that you "
98
+ "are running %2$s. This can make the editor unstable."
99
+
100
+ #: ../tadv_admin.php:251
101
+ #, php-format
102
+ msgid ""
103
+ "Please upgrade your WordPress installation or download an <a href=\"%s"
104
+ "\">older version of the plugin</a>."
105
+ msgstr ""
106
+ "Zaktualizuj swoją instalację WordPressa lub pobierz <a href=\"%s\">starszą "
107
+ "wersję tej wtyczki</a>."
108
+
109
+ #: ../tadv_admin.php:261
110
+ msgid "Settings saved."
111
+ msgstr "Ustawienia zapisane."
112
+
113
+ #: ../tadv_admin.php:270 ../tadv_admin.php:534
114
+ msgid "Save Changes"
115
+ msgstr "Zapisz Zmiany"
116
+
117
+ #: ../tadv_admin.php:275
118
+ msgid ""
119
+ "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
120
+ "most buttons are also available as menu items."
121
+ msgstr ""
122
+ "Nowością w TinyMCE 4.0/WordPressie 3.9 jest menu edytora. Gdy włączone, "
123
+ "większość przycisków dostępne jest również jako opcje w menu."
124
+
125
+ #: ../tadv_admin.php:279
126
+ msgid "Enable the editor menu."
127
+ msgstr "Włącz menu edytora."
128
+
129
+ #: ../tadv_admin.php:391
130
+ msgid ""
131
+ "Drag buttons from the unused buttons below and drop them in the toolbars "
132
+ "above, or drag the buttons in the toolbars to rearrange them."
133
+ msgstr ""
134
+ "Przeciągnij przyciski z nieużywanych przycisków poniżej i upuść je w paskach "
135
+ "powyżej, lub przeciągnij je w paskach, by zmienić ich położenie."
136
+
137
+ #: ../tadv_admin.php:394
138
+ msgid "Unused Buttons"
139
+ msgstr "Nieużywane przyciski"
140
+
141
+ #: ../tadv_admin.php:435
142
+ msgid "Also enable:"
143
+ msgstr "Włącz również:"
144
+
145
+ #: ../tadv_admin.php:438
146
+ msgid "List Style Options"
147
+ msgstr "Ustawienia Stylu Listy"
148
+
149
+ #: ../tadv_admin.php:443
150
+ msgid "Context Menu"
151
+ msgstr "Menu Kontekstowe"
152
+
153
+ #: ../tadv_admin.php:448
154
+ msgid "Link (replaces the Insert/Edit Link dialog)"
155
+ msgstr "Link (zastępuje okno Wstaw/Edytuj Link)"
156
+
157
+ #: ../tadv_admin.php:458
158
+ msgid "Advanced Options"
159
+ msgstr "Ustawienia Zaawansowane"
160
+
161
+ #: ../tadv_admin.php:466
162
+ msgid "Import editor-style.css."
163
+ msgstr "Zaimportuj editor-style.css."
164
+
165
+ #: ../tadv_admin.php:468
166
+ msgid "It seems your theme does not support customised styles for the editor."
167
+ msgstr ""
168
+ "Wygląda na to, że twój motyw nie wspiera zmodyfikowanych stylów dla edytora."
169
+
170
+ #: ../tadv_admin.php:469
171
+ msgid ""
172
+ "You can create a CSS file named <code>editor-style.css</code> and upload it "
173
+ "to your theme's directory."
174
+ msgstr ""
175
+ "Możesz utworzyć plik CSS nazwany <code>editor-style.css</code> i załadować "
176
+ "go do katalogu twojego motywu."
177
+
178
+ #: ../tadv_admin.php:470
179
+ msgid "After that, enable this setting."
180
+ msgstr "Gdy to zrobisz, aktywuj tą opcję."
181
+
182
+ #: ../tadv_admin.php:479
183
+ msgid ""
184
+ "Load the CSS classes used in editor-style.css and replace the Formats button "
185
+ "and sub-menu."
186
+ msgstr ""
187
+ "Załaduj klasy CSS użyte w editor-style.css i zmień przycisk oraz podmenu "
188
+ "Formaty."
189
+
190
+ #: ../tadv_admin.php:484
191
+ msgid "Markdown typing support (text pattern plugin)"
192
+ msgstr "Wsparcie Markdown (wtyczka szablonu tekstu)"
193
+
194
+ #: ../tadv_admin.php:486
195
+ msgid ""
196
+ "This plugin matches special patterns while you type and applies formats or "
197
+ "executes commands on the matched text."
198
+ msgstr ""
199
+ "Ta wtyczka będzie oznaczać specjalne wyrażenia podczas pisania i "
200
+ "automatycznie dodawać formatowanie lub wykonywać polecenia na oznaczonym "
201
+ "tekście."
202
+
203
+ #: ../tadv_admin.php:487
204
+ msgid ""
205
+ "The default patterns are the same as the markdown syntax so you can type "
206
+ "<code># text</code> to create a header, <code>1. text</code> to create a "
207
+ "list, <code>**text**</code> to make it bold, etc."
208
+ msgstr ""
209
+ "Domyślnie działa to jak Markdown, więc możesz napisać <code># tekst</code> "
210
+ "aby stworzyć nagłówek, <code>1. tekst</code> aby stworzyć listę, "
211
+ "<code>**tekst**</code> aby pogrubić, itd."
212
+
213
+ #: ../tadv_admin.php:488
214
+ msgid "More information"
215
+ msgstr "Więcej informacji"
216
+
217
+ #: ../tadv_admin.php:494
218
+ msgid ""
219
+ "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
220
+ "in the Text editor"
221
+ msgstr ""
222
+ "Przestań usuwać tagi &lt;p&gt; i &lt;br /&gt; podczas zapisywania i pokazuj "
223
+ "je w edytorze Tekstowym."
224
+
225
+ #: ../tadv_admin.php:496
226
+ msgid ""
227
+ "This will make it possible to use more advanced coding in the HTML editor "
228
+ "without the back-end filtering affecting it much."
229
+ msgstr ""
230
+ "Umożliwi to zaawansowaną edycję w edytorze HTMLa bez szczególnego "
231
+ "filtrowania backendu zbyt zmieniającego pisany kod."
232
+
233
+ #: ../tadv_admin.php:497
234
+ msgid ""
235
+ "However it may behave unexpectedly in rare cases, so test it thoroughly "
236
+ "before enabling it permanently."
237
+ msgstr ""
238
+ "Może to jednak zachowywać się nieprzewidzianie w rzadkich przypadkach, więc "
239
+ "przetestuj tą opcję dogłębnie przed korzystaniem z niej na stałe."
240
+
241
+ #: ../tadv_admin.php:498
242
+ msgid ""
243
+ "Line breaks in the HTML editor would still affect the output, in particular "
244
+ "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
245
+ "&gt; tags."
246
+ msgstr ""
247
+ "Znaki nowej linii w edytorze HTMLa nadal będą zmieniać wyjście, nie używaj "
248
+ "pustych linii, nowych linii wewnątrz tagów HTMLa ani wielu tagów &lt;br /"
249
+ "&gt;."
250
+
251
+ #: ../tadv_admin.php:504
252
+ msgid "Replace font size settings"
253
+ msgstr "Zmień ustawienia rozmiaru czcionki"
254
+
255
+ #: ../tadv_admin.php:505
256
+ msgid ""
257
+ "Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px "
258
+ "20px 24px 28px 32px 36px."
259
+ msgstr ""
260
+ "Zmienia dostępne rozmiary czcionki na: 8px 10px 12px 14px 16px 20px 24px "
261
+ "28px 32px 36px."
262
+
263
+ #: ../tadv_admin.php:510
264
+ msgid "Enable pasting of image source"
265
+ msgstr "Włącz wklejanie źródeł obrazów."
266
+
267
+ #: ../tadv_admin.php:512
268
+ msgid ""
269
+ "Works only in Firefox and Safari. These browsers support pasting of images "
270
+ "directly in the editor and convert them to base64 encoded text."
271
+ msgstr ""
272
+ "Działa tylko w Firefoksie i Safari. Te przeglądarki umożliwiają wklejanie "
273
+ "obrazów bezpośrednio w edytorze i ich konwersję do zakodowanego tekstu "
274
+ "base64."
275
+
276
+ #: ../tadv_admin.php:513
277
+ msgid ""
278
+ "This is not acceptable for larger images like photos or graphics, but may be "
279
+ "useful in some cases for very small images like icons, not larger than 2-3KB."
280
+ msgstr ""
281
+ "Nie jest to sensowne dla dużych obrazów jak zdjęcia czy grafiki, ale może "
282
+ "być przydatne dla bardzo małych obrazków jak ikony, nie większych niż 2-3KB."
283
+
284
+ #: ../tadv_admin.php:514
285
+ msgid "These images will not be available in the Media Library."
286
+ msgstr "Obrazy te nie będą dostępne w Bibliotece Mediów."
287
+
288
+ #: ../tadv_admin.php:520
289
+ msgid "Administration"
290
+ msgstr "Administracja"
291
+
292
+ #: ../tadv_admin.php:522
293
+ msgid "Export Settings"
294
+ msgstr "Eksport Ustawień"
295
+
296
+ #: ../tadv_admin.php:523
297
+ msgid "Import Settings"
298
+ msgstr "Import Ustawień"
299
+
300
+ #: ../tadv_admin.php:533
301
+ msgid "Restore Default Settings"
302
+ msgstr "Przywróć Domyślne Ustawienia"
303
+
304
+ #: ../tadv_admin.php:539
305
+ msgid ""
306
+ "The [Toolbar toggle] button shows or hides the second, third, and forth "
307
+ "button rows. It will only work when it is in the first row and there are "
308
+ "buttons in the second row."
309
+ msgstr ""
310
+ "Przycisk [Przełącz widoczność paska narzędzi] pokazuje lub ukrywa drugi, "
311
+ "trzeci i czwarty rząd przycisków. Będzie działać tylko jeśli jest w "
312
+ "pierwszym rzędzie i istnieją przyciski w drugim."
langs/tinymce-advanced.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: TinyMCE Advanced\n"
4
- "POT-Creation-Date: 2014-12-16 00:22-0800\n"
5
- "PO-Revision-Date: 2014-12-16 00:23-0800\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
@@ -18,241 +18,247 @@ msgstr ""
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPath-1: ..\n"
20
 
21
- #: ../tadv_admin.php:21
22
- #, php-format
23
- msgid ""
24
- "This plugin requires WordPress version %1$s or newer. Please upgrade your "
25
- "WordPress installation or download an <a href=\"%2$s\">older version of the "
26
- "plugin</a>."
27
- msgstr ""
28
-
29
- #: ../tadv_admin.php:145
30
  msgid "Default settings restored."
31
  msgstr ""
32
 
33
- #: ../tadv_admin.php:154
34
  msgid "TinyMCE Advanced Settings Export"
35
  msgstr ""
36
 
37
- #: ../tadv_admin.php:158
38
  msgid "The settings are exported as a JSON encoded string."
39
  msgstr ""
40
 
41
- #: ../tadv_admin.php:159
42
  msgid ""
43
  "Please copy the content and save it in a <b>text</b> (.txt) file, using a "
44
  "plain text editor like Notepad."
45
  msgstr ""
46
 
47
- #: ../tadv_admin.php:160
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
- #: ../tadv_admin.php:165
54
  msgid "Select All"
55
  msgstr ""
56
 
57
- #: ../tadv_admin.php:167 ../tadv_admin.php:191
58
  msgid "Back to Editor Settings"
59
  msgstr ""
60
 
61
- #: ../tadv_admin.php:177
62
  msgid "TinyMCE Advanced Settings Import"
63
  msgstr ""
64
 
65
- #: ../tadv_admin.php:180
66
  msgid ""
67
  "The settings are imported from a JSON encoded string. Please paste the "
68
  "exported string in the text area below."
69
  msgstr ""
70
 
71
- #: ../tadv_admin.php:185
72
  msgid "Verify"
73
  msgstr ""
74
 
75
- #: ../tadv_admin.php:186
76
  msgid "Import"
77
  msgstr ""
78
 
79
- #: ../tadv_admin.php:213
80
  msgid "Importing of settings failed."
81
  msgstr ""
82
 
83
- #: ../tadv_admin.php:238
84
  msgid "ERROR: All toolbars are empty. Default settings loaded."
85
  msgstr ""
86
 
87
- #: ../tadv_admin.php:250
88
  msgid "Editor Settings"
89
  msgstr ""
90
 
91
- #: ../tadv_admin.php:254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  msgid "Settings saved."
93
  msgstr ""
94
 
95
- #: ../tadv_admin.php:263 ../tadv_admin.php:527
96
  msgid "Save Changes"
97
  msgstr ""
98
 
99
- #: ../tadv_admin.php:268
100
  msgid ""
101
  "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
102
  "most buttons are also available as menu items."
103
  msgstr ""
104
 
105
- #: ../tadv_admin.php:272
106
  msgid "Enable the editor menu."
107
  msgstr ""
108
 
109
- #: ../tadv_admin.php:384
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
- #: ../tadv_admin.php:387
116
  msgid "Unused Buttons"
117
  msgstr ""
118
 
119
- #: ../tadv_admin.php:428
120
  msgid "Also enable:"
121
  msgstr ""
122
 
123
- #: ../tadv_admin.php:431
124
  msgid "List Style Options"
125
  msgstr ""
126
 
127
- #: ../tadv_admin.php:436
128
  msgid "Context Menu"
129
  msgstr ""
130
 
131
- #: ../tadv_admin.php:441
132
  msgid "Link (replaces the Insert/Edit Link dialog)"
133
  msgstr ""
134
 
135
- #: ../tadv_admin.php:451
136
  msgid "Advanced Options"
137
  msgstr ""
138
 
139
- #: ../tadv_admin.php:459
140
  msgid "Import editor-style.css."
141
  msgstr ""
142
 
143
- #: ../tadv_admin.php:461
144
  msgid "It seems your theme does not support customised styles for the editor."
145
  msgstr ""
146
 
147
- #: ../tadv_admin.php:462
148
  msgid ""
149
  "You can create a CSS file named <code>editor-style.css</code> and upload it "
150
  "to your theme's directory."
151
  msgstr ""
152
 
153
- #: ../tadv_admin.php:463
154
  msgid "After that, enable this setting."
155
  msgstr ""
156
 
157
- #: ../tadv_admin.php:472
158
  msgid ""
159
  "Load the CSS classes used in editor-style.css and replace the Formats button "
160
  "and sub-menu."
161
  msgstr ""
162
 
163
- #: ../tadv_admin.php:477
164
  msgid "Markdown typing support (text pattern plugin)"
165
  msgstr ""
166
 
167
- #: ../tadv_admin.php:479
168
  msgid ""
169
  "This plugin matches special patterns while you type and applies formats or "
170
  "executes commands on the matched text."
171
  msgstr ""
172
 
173
- #: ../tadv_admin.php:480
174
  msgid ""
175
  "The default patterns are the same as the markdown syntax so you can type "
176
  "<code># text</code> to create a header, <code>1. text</code> to create a "
177
  "list, <code>**text**</code> to make it bold, etc."
178
  msgstr ""
179
 
180
- #: ../tadv_admin.php:481
181
  msgid "More information"
182
  msgstr ""
183
 
184
- #: ../tadv_admin.php:487
185
  msgid ""
186
  "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
187
  "in the Text editor"
188
  msgstr ""
189
 
190
- #: ../tadv_admin.php:489
191
  msgid ""
192
  "This will make it possible to use more advanced coding in the HTML editor "
193
  "without the back-end filtering affecting it much."
194
  msgstr ""
195
 
196
- #: ../tadv_admin.php:490
197
  msgid ""
198
  "However it may behave unexpectedly in rare cases, so test it thoroughly "
199
  "before enabling it permanently."
200
  msgstr ""
201
 
202
- #: ../tadv_admin.php:491
203
  msgid ""
204
  "Line breaks in the HTML editor would still affect the output, in particular "
205
  "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
206
  "&gt; tags."
207
  msgstr ""
208
 
209
- #: ../tadv_admin.php:497
210
  msgid "Replace font size settings"
211
  msgstr ""
212
 
213
- #: ../tadv_admin.php:498
214
  msgid ""
215
  "Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px "
216
  "20px 24px 28px 32px 36px."
217
  msgstr ""
218
 
219
- #: ../tadv_admin.php:503
220
  msgid "Enable pasting of image source"
221
  msgstr ""
222
 
223
- #: ../tadv_admin.php:505
224
  msgid ""
225
  "Works only in Firefox and Safari. These browsers support pasting of images "
226
  "directly in the editor and convert them to base64 encoded text."
227
  msgstr ""
228
 
229
- #: ../tadv_admin.php:506
230
  msgid ""
231
  "This is not acceptable for larger images like photos or graphics, but may be "
232
  "useful in some cases for very small images like icons, not larger than 2-3KB."
233
  msgstr ""
234
 
235
- #: ../tadv_admin.php:507
236
  msgid "These images will not be available in the Media Library."
237
  msgstr ""
238
 
239
- #: ../tadv_admin.php:513
240
  msgid "Administration"
241
  msgstr ""
242
 
243
- #: ../tadv_admin.php:515
244
  msgid "Export Settings"
245
  msgstr ""
246
 
247
- #: ../tadv_admin.php:516
248
  msgid "Import Settings"
249
  msgstr ""
250
 
251
- #: ../tadv_admin.php:526
252
  msgid "Restore Default Settings"
253
  msgstr ""
254
 
255
- #: ../tadv_admin.php:532
256
  msgid ""
257
  "The [Toolbar toggle] button shows or hides the second, third, and forth "
258
  "button rows. It will only work when it is in the first row and there are "
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: TinyMCE Advanced\n"
4
+ "POT-Creation-Date: 2015-04-02 17:49-0800\n"
5
+ "PO-Revision-Date: 2015-04-02 17:49-0800\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: en_US\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPath-1: ..\n"
20
 
21
+ #: ../tadv_admin.php:128
 
 
 
 
 
 
 
 
22
  msgid "Default settings restored."
23
  msgstr ""
24
 
25
+ #: ../tadv_admin.php:137
26
  msgid "TinyMCE Advanced Settings Export"
27
  msgstr ""
28
 
29
+ #: ../tadv_admin.php:141
30
  msgid "The settings are exported as a JSON encoded string."
31
  msgstr ""
32
 
33
+ #: ../tadv_admin.php:142
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
 
39
+ #: ../tadv_admin.php:143
40
  msgid ""
41
  "It is important that the export is not changed in any way, no spaces, line "
42
  "breaks, etc."
43
  msgstr ""
44
 
45
+ #: ../tadv_admin.php:148
46
  msgid "Select All"
47
  msgstr ""
48
 
49
+ #: ../tadv_admin.php:150 ../tadv_admin.php:174
50
  msgid "Back to Editor Settings"
51
  msgstr ""
52
 
53
+ #: ../tadv_admin.php:160
54
  msgid "TinyMCE Advanced Settings Import"
55
  msgstr ""
56
 
57
+ #: ../tadv_admin.php:163
58
  msgid ""
59
  "The settings are imported from a JSON encoded string. Please paste the "
60
  "exported string in the text area below."
61
  msgstr ""
62
 
63
+ #: ../tadv_admin.php:168
64
  msgid "Verify"
65
  msgstr ""
66
 
67
+ #: ../tadv_admin.php:169
68
  msgid "Import"
69
  msgstr ""
70
 
71
+ #: ../tadv_admin.php:196
72
  msgid "Importing of settings failed."
73
  msgstr ""
74
 
75
+ #: ../tadv_admin.php:221
76
  msgid "ERROR: All toolbars are empty. Default settings loaded."
77
  msgstr ""
78
 
79
+ #: ../tadv_admin.php:233
80
  msgid "Editor Settings"
81
  msgstr ""
82
 
83
+ #: ../tadv_admin.php:244
84
+ #, php-format
85
+ msgid ""
86
+ "This plugin requires WordPress version %1$s or newer. It appears that you "
87
+ "are running %2$s. This can make the editor unstable."
88
+ msgstr ""
89
+
90
+ #: ../tadv_admin.php:251
91
+ #, php-format
92
+ msgid ""
93
+ "Please upgrade your WordPress installation or download an <a href=\"%s"
94
+ "\">older version of the plugin</a>."
95
+ msgstr ""
96
+
97
+ #: ../tadv_admin.php:261
98
  msgid "Settings saved."
99
  msgstr ""
100
 
101
+ #: ../tadv_admin.php:270 ../tadv_admin.php:534
102
  msgid "Save Changes"
103
  msgstr ""
104
 
105
+ #: ../tadv_admin.php:275
106
  msgid ""
107
  "New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
108
  "most buttons are also available as menu items."
109
  msgstr ""
110
 
111
+ #: ../tadv_admin.php:279
112
  msgid "Enable the editor menu."
113
  msgstr ""
114
 
115
+ #: ../tadv_admin.php:391
116
  msgid ""
117
  "Drag buttons from the unused buttons below and drop them in the toolbars "
118
  "above, or drag the buttons in the toolbars to rearrange them."
119
  msgstr ""
120
 
121
+ #: ../tadv_admin.php:394
122
  msgid "Unused Buttons"
123
  msgstr ""
124
 
125
+ #: ../tadv_admin.php:435
126
  msgid "Also enable:"
127
  msgstr ""
128
 
129
+ #: ../tadv_admin.php:438
130
  msgid "List Style Options"
131
  msgstr ""
132
 
133
+ #: ../tadv_admin.php:443
134
  msgid "Context Menu"
135
  msgstr ""
136
 
137
+ #: ../tadv_admin.php:448
138
  msgid "Link (replaces the Insert/Edit Link dialog)"
139
  msgstr ""
140
 
141
+ #: ../tadv_admin.php:458
142
  msgid "Advanced Options"
143
  msgstr ""
144
 
145
+ #: ../tadv_admin.php:466
146
  msgid "Import editor-style.css."
147
  msgstr ""
148
 
149
+ #: ../tadv_admin.php:468
150
  msgid "It seems your theme does not support customised styles for the editor."
151
  msgstr ""
152
 
153
+ #: ../tadv_admin.php:469
154
  msgid ""
155
  "You can create a CSS file named <code>editor-style.css</code> and upload it "
156
  "to your theme's directory."
157
  msgstr ""
158
 
159
+ #: ../tadv_admin.php:470
160
  msgid "After that, enable this setting."
161
  msgstr ""
162
 
163
+ #: ../tadv_admin.php:479
164
  msgid ""
165
  "Load the CSS classes used in editor-style.css and replace the Formats button "
166
  "and sub-menu."
167
  msgstr ""
168
 
169
+ #: ../tadv_admin.php:484
170
  msgid "Markdown typing support (text pattern plugin)"
171
  msgstr ""
172
 
173
+ #: ../tadv_admin.php:486
174
  msgid ""
175
  "This plugin matches special patterns while you type and applies formats or "
176
  "executes commands on the matched text."
177
  msgstr ""
178
 
179
+ #: ../tadv_admin.php:487
180
  msgid ""
181
  "The default patterns are the same as the markdown syntax so you can type "
182
  "<code># text</code> to create a header, <code>1. text</code> to create a "
183
  "list, <code>**text**</code> to make it bold, etc."
184
  msgstr ""
185
 
186
+ #: ../tadv_admin.php:488
187
  msgid "More information"
188
  msgstr ""
189
 
190
+ #: ../tadv_admin.php:494
191
  msgid ""
192
  "Stop removing the &lt;p&gt; and &lt;br /&gt; tags when saving and show them "
193
  "in the Text editor"
194
  msgstr ""
195
 
196
+ #: ../tadv_admin.php:496
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
+ #: ../tadv_admin.php:497
203
  msgid ""
204
  "However it may behave unexpectedly in rare cases, so test it thoroughly "
205
  "before enabling it permanently."
206
  msgstr ""
207
 
208
+ #: ../tadv_admin.php:498
209
  msgid ""
210
  "Line breaks in the HTML editor would still affect the output, in particular "
211
  "do not use empty lines, line breaks inside HTML tags or multiple &lt;br /"
212
  "&gt; tags."
213
  msgstr ""
214
 
215
+ #: ../tadv_admin.php:504
216
  msgid "Replace font size settings"
217
  msgstr ""
218
 
219
+ #: ../tadv_admin.php:505
220
  msgid ""
221
  "Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px "
222
  "20px 24px 28px 32px 36px."
223
  msgstr ""
224
 
225
+ #: ../tadv_admin.php:510
226
  msgid "Enable pasting of image source"
227
  msgstr ""
228
 
229
+ #: ../tadv_admin.php:512
230
  msgid ""
231
  "Works only in Firefox and Safari. These browsers support pasting of images "
232
  "directly in the editor and convert them to base64 encoded text."
233
  msgstr ""
234
 
235
+ #: ../tadv_admin.php:513
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
+ #: ../tadv_admin.php:514
242
  msgid "These images will not be available in the Media Library."
243
  msgstr ""
244
 
245
+ #: ../tadv_admin.php:520
246
  msgid "Administration"
247
  msgstr ""
248
 
249
+ #: ../tadv_admin.php:522
250
  msgid "Export Settings"
251
  msgstr ""
252
 
253
+ #: ../tadv_admin.php:523
254
  msgid "Import Settings"
255
  msgstr ""
256
 
257
+ #: ../tadv_admin.php:533
258
  msgid "Restore Default Settings"
259
  msgstr ""
260
 
261
+ #: ../tadv_admin.php:539
262
  msgid ""
263
  "The [Toolbar toggle] button shows or hides the second, third, and forth "
264
  "button rows. It will only work when it is in the first row and there are "
mce/importcss/plugin.js CHANGED
@@ -14,7 +14,7 @@ tinymce.PluginManager.add('importcss', function(editor) {
14
  var self = this, each = tinymce.each;
15
 
16
  function compileFilter(filter) {
17
- if (typeof(filter) == "string") {
18
  return function(value) {
19
  return value.indexOf(filter) !== -1;
20
  };
14
  var self = this, each = tinymce.each;
15
 
16
  function compileFilter(filter) {
17
+ if (typeof filter == "string") {
18
  return function(value) {
19
  return value.indexOf(filter) !== -1;
20
  };
mce/link/plugin.js CHANGED
@@ -15,14 +15,14 @@ tinymce.PluginManager.add('link', function(editor) {
15
  return function() {
16
  var linkList = editor.settings.link_list;
17
 
18
- if (typeof(linkList) == "string") {
19
  tinymce.util.XHR.send({
20
  url: linkList,
21
  success: function(text) {
22
  callback(tinymce.util.JSON.parse(text));
23
  }
24
  });
25
- } else if (typeof(linkList) == "function") {
26
  linkList(callback);
27
  } else {
28
  callback(linkList);
@@ -152,8 +152,8 @@ tinymce.PluginManager.add('link', function(editor) {
152
  data.text = initialText = anchorElm ? (anchorElm.innerText || anchorElm.textContent) : selection.getContent({format: 'text'});
153
  data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
154
 
155
- if ((value = dom.getAttrib(anchorElm, 'target'))) {
156
- data.target = value;
157
  } else if (editor.settings.default_link_target) {
158
  data.target = editor.settings.default_link_target;
159
  }
@@ -276,6 +276,7 @@ tinymce.PluginManager.add('link', function(editor) {
276
  classListCtrl
277
  ],
278
  onSubmit: function(e) {
 
279
  var href;
280
 
281
  data = tinymce.extend(data, e.data);
@@ -347,8 +348,9 @@ tinymce.PluginManager.add('link', function(editor) {
347
  return;
348
  }
349
 
350
- // Is www. prefixed
351
- if (/^\s*www\./i.test(href)) {
 
352
  delayedConfirm(
353
  'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?',
354
  function(state) {
@@ -371,7 +373,7 @@ tinymce.PluginManager.add('link', function(editor) {
371
  editor.addButton('link', {
372
  icon: 'link',
373
  tooltip: 'Insert/edit link',
374
- shortcut: 'Ctrl+K',
375
  onclick: createLinkList(showDialog),
376
  stateSelector: 'a[href]'
377
  });
@@ -383,15 +385,15 @@ tinymce.PluginManager.add('link', function(editor) {
383
  stateSelector: 'a[href]'
384
  });
385
 
386
- editor.addShortcut('Ctrl+K', '', createLinkList(showDialog));
387
  editor.addCommand('mceLink', createLinkList(showDialog));
388
 
389
  this.showDialog = showDialog;
390
 
391
  editor.addMenuItem('link', {
392
  icon: 'link',
393
- text: 'Insert link',
394
- shortcut: 'Ctrl+K',
395
  onclick: createLinkList(showDialog),
396
  stateSelector: 'a[href]',
397
  context: 'insert',
15
  return function() {
16
  var linkList = editor.settings.link_list;
17
 
18
+ if (typeof linkList == "string") {
19
  tinymce.util.XHR.send({
20
  url: linkList,
21
  success: function(text) {
22
  callback(tinymce.util.JSON.parse(text));
23
  }
24
  });
25
+ } else if (typeof linkList == "function") {
26
  linkList(callback);
27
  } else {
28
  callback(linkList);
152
  data.text = initialText = anchorElm ? (anchorElm.innerText || anchorElm.textContent) : selection.getContent({format: 'text'});
153
  data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
154
 
155
+ if (anchorElm) {
156
+ data.target = dom.getAttrib(anchorElm, 'target');
157
  } else if (editor.settings.default_link_target) {
158
  data.target = editor.settings.default_link_target;
159
  }
276
  classListCtrl
277
  ],
278
  onSubmit: function(e) {
279
+ /*eslint dot-notation: 0*/
280
  var href;
281
 
282
  data = tinymce.extend(data, e.data);
348
  return;
349
  }
350
 
351
+ // Is not protocol prefixed
352
+ if ((editor.settings.link_assume_external_targets && !/^\w+:/i.test(href)) ||
353
+ (!editor.settings.link_assume_external_targets && /^\s*www\./i.test(href))) {
354
  delayedConfirm(
355
  'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?',
356
  function(state) {
373
  editor.addButton('link', {
374
  icon: 'link',
375
  tooltip: 'Insert/edit link',
376
+ shortcut: 'Meta+K',
377
  onclick: createLinkList(showDialog),
378
  stateSelector: 'a[href]'
379
  });
385
  stateSelector: 'a[href]'
386
  });
387
 
388
+ editor.addShortcut('Meta+K', '', createLinkList(showDialog));
389
  editor.addCommand('mceLink', createLinkList(showDialog));
390
 
391
  this.showDialog = showDialog;
392
 
393
  editor.addMenuItem('link', {
394
  icon: 'link',
395
+ text: 'Insert/edit link',
396
+ shortcut: 'Meta+K',
397
  onclick: createLinkList(showDialog),
398
  stateSelector: 'a[href]',
399
  context: 'insert',
mce/link/plugin.min.js CHANGED
@@ -1 +1 @@
1
- tinymce.PluginManager.add("link",function(a){function b(b){return function(){var c=a.settings.link_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b&&b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){function d(a){var b=l.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#href").value(a.control.value())}function e(b){var c=[];return tinymce.each(a.dom.select("a:not([href])"),function(a){var d=a.name||a.id;d&&c.push({text:d,value:"#"+d,selected:-1!=b.indexOf("#"+d)})}),c.length?(c.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:c,onselect:d}):void 0}function f(){!k&&0===u.text.length&&m&&this.parent().parent().find("#text")[0].value(this.value())}function g(b){var c=b.meta||{};o&&o.value(a.convertURL(this.value(),"href")),tinymce.each(b.meta,function(a,b){l.find("#"+b).value(a)}),c.text||f.call(this)}function h(a){var b=v.getContent();if(/</.test(b)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(b)||-1==b.indexOf("href=")))return!1;if(a){var c,d=a.childNodes;if(0===d.length)return!1;for(c=d.length-1;c>=0;c--)if(3!=d[c].nodeType)return!1}return!0}var i,j,k,l,m,n,o,p,q,r,s,t,u={},v=a.selection,w=a.dom;i=v.getNode(),j=w.getParent(i,"a[href]"),m=h(),u.text=k=j?j.innerText||j.textContent:v.getContent({format:"text"}),u.href=j?w.getAttrib(j,"href"):"",(t=w.getAttrib(j,"target"))?u.target=t:a.settings.default_link_target&&(u.target=a.settings.default_link_target),(t=w.getAttrib(j,"rel"))&&(u.rel=t),(t=w.getAttrib(j,"class"))&&(u["class"]=t),(t=w.getAttrib(j,"title"))&&(u.title=t),m&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){u.text=this.value()}}),b&&(o={type:"listbox",label:"Link list",values:c(b,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:d,value:a.convertURL(u.href,"href"),onPostRender:function(){o=this}}),a.settings.target_list!==!1&&(a.settings.target_list||(a.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),q={name:"target",type:"listbox",label:"Target",values:c(a.settings.target_list)}),a.settings.rel_list&&(p={name:"rel",type:"listbox",label:"Rel",values:c(a.settings.rel_list)}),a.settings.link_class_list&&(r={name:"class",type:"listbox",label:"Class",values:c(a.settings.link_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),a.settings.link_title!==!1&&(s={name:"title",type:"textbox",label:"Title",value:u.title}),l=a.windowManager.open({title:"Insert link",data:u,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:g,onkeyup:f},n,s,e(u.href),o,p,q,r],onSubmit:function(b){function c(b,c){var d=a.selection.getRng();window.setTimeout(function(){a.windowManager.confirm(b,function(b){a.selection.setRng(d),c(b)})},0)}function d(){var b={href:e,target:u.target?u.target:null,rel:u.rel?u.rel:null,"class":u["class"]?u["class"]:null,title:u.title?u.title:null};j?(a.focus(),m&&u.text!=k&&("innerText"in j?j.innerText=u.text:j.textContent=u.text),w.setAttribs(j,b),v.select(j),a.undoManager.add()):m?a.insertContent(w.createHTML("a",b,w.encode(u.text))):a.execCommand("mceInsertLink",!1,b)}var e;return u=tinymce.extend(u,b.data),(e=u.href)?e.indexOf("@")>0&&-1==e.indexOf("//")&&-1==e.indexOf("mailto:")?void c("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(e="mailto:"+e),d()}):/^\s*www\./i.test(e)?void c("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(e="http://"+e),d()}):void d():void a.execCommand("unlink")}})}a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:b(d),stateSelector:"a[href]"}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addShortcut("Ctrl+K","",b(d)),a.addCommand("mceLink",b(d)),this.showDialog=d,a.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:b(d),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
1
+ tinymce.PluginManager.add("link",function(a){function b(b){return function(){var c=a.settings.link_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b&&b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){function d(a){var b=l.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#href").value(a.control.value())}function e(b){var c=[];return tinymce.each(a.dom.select("a:not([href])"),function(a){var d=a.name||a.id;d&&c.push({text:d,value:"#"+d,selected:-1!=b.indexOf("#"+d)})}),c.length?(c.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:c,onselect:d}):void 0}function f(){!k&&0===u.text.length&&m&&this.parent().parent().find("#text")[0].value(this.value())}function g(b){var c=b.meta||{};o&&o.value(a.convertURL(this.value(),"href")),tinymce.each(b.meta,function(a,b){l.find("#"+b).value(a)}),c.text||f.call(this)}function h(a){var b=v.getContent();if(/</.test(b)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(b)||-1==b.indexOf("href=")))return!1;if(a){var c,d=a.childNodes;if(0===d.length)return!1;for(c=d.length-1;c>=0;c--)if(3!=d[c].nodeType)return!1}return!0}var i,j,k,l,m,n,o,p,q,r,s,t,u={},v=a.selection,w=a.dom;i=v.getNode(),j=w.getParent(i,"a[href]"),m=h(),u.text=k=j?j.innerText||j.textContent:v.getContent({format:"text"}),u.href=j?w.getAttrib(j,"href"):"",j?u.target=w.getAttrib(j,"target"):a.settings.default_link_target&&(u.target=a.settings.default_link_target),(t=w.getAttrib(j,"rel"))&&(u.rel=t),(t=w.getAttrib(j,"class"))&&(u["class"]=t),(t=w.getAttrib(j,"title"))&&(u.title=t),m&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){u.text=this.value()}}),b&&(o={type:"listbox",label:"Link list",values:c(b,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:d,value:a.convertURL(u.href,"href"),onPostRender:function(){o=this}}),a.settings.target_list!==!1&&(a.settings.target_list||(a.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),q={name:"target",type:"listbox",label:"Target",values:c(a.settings.target_list)}),a.settings.rel_list&&(p={name:"rel",type:"listbox",label:"Rel",values:c(a.settings.rel_list)}),a.settings.link_class_list&&(r={name:"class",type:"listbox",label:"Class",values:c(a.settings.link_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),a.settings.link_title!==!1&&(s={name:"title",type:"textbox",label:"Title",value:u.title}),l=a.windowManager.open({title:"Insert link",data:u,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:g,onkeyup:f},n,s,e(u.href),o,p,q,r],onSubmit:function(b){function c(b,c){var d=a.selection.getRng();window.setTimeout(function(){a.windowManager.confirm(b,function(b){a.selection.setRng(d),c(b)})},0)}function d(){var b={href:e,target:u.target?u.target:null,rel:u.rel?u.rel:null,"class":u["class"]?u["class"]:null,title:u.title?u.title:null};j?(a.focus(),m&&u.text!=k&&("innerText"in j?j.innerText=u.text:j.textContent=u.text),w.setAttribs(j,b),v.select(j),a.undoManager.add()):m?a.insertContent(w.createHTML("a",b,w.encode(u.text))):a.execCommand("mceInsertLink",!1,b)}var e;return u=tinymce.extend(u,b.data),(e=u.href)?e.indexOf("@")>0&&-1==e.indexOf("//")&&-1==e.indexOf("mailto:")?void c("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(e="mailto:"+e),d()}):a.settings.link_assume_external_targets&&!/^\w+:/i.test(e)||!a.settings.link_assume_external_targets&&/^\s*www\./i.test(e)?void c("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(e="http://"+e),d()}):void d():void a.execCommand("unlink")}})}a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]"}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addShortcut("Meta+K","",b(d)),a.addCommand("mceLink",b(d)),this.showDialog=d,a.addMenuItem("link",{icon:"link",text:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
mce/print/plugin.js CHANGED
@@ -20,13 +20,13 @@ tinymce.PluginManager.add('print', function(editor) {
20
  cmd: 'mcePrint'
21
  });
22
 
23
- editor.addShortcut('Ctrl+P', '', 'mcePrint');
24
 
25
  editor.addMenuItem('print', {
26
  text: 'Print',
27
  cmd: 'mcePrint',
28
  icon: 'print',
29
- shortcut: 'Ctrl+P',
30
  context: 'file'
31
  });
32
  });
20
  cmd: 'mcePrint'
21
  });
22
 
23
+ editor.addShortcut('Meta+P', '', 'mcePrint');
24
 
25
  editor.addMenuItem('print', {
26
  text: 'Print',
27
  cmd: 'mcePrint',
28
  icon: 'print',
29
+ shortcut: 'Meta+P',
30
  context: 'file'
31
  });
32
  });
mce/print/plugin.min.js CHANGED
@@ -1 +1 @@
1
- tinymce.PluginManager.add("print",function(a){a.addCommand("mcePrint",function(){a.getWin().print()}),a.addButton("print",{title:"Print",cmd:"mcePrint"}),a.addShortcut("Ctrl+P","","mcePrint"),a.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Ctrl+P",context:"file"})});
1
+ tinymce.PluginManager.add("print",function(a){a.addCommand("mcePrint",function(){a.getWin().print()}),a.addButton("print",{title:"Print",cmd:"mcePrint"}),a.addShortcut("Meta+P","","mcePrint"),a.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Meta+P",context:"file"})});
mce/searchreplace/plugin.js CHANGED
@@ -367,7 +367,7 @@
367
  self.init = function(ed) {
368
  ed.addMenuItem('searchreplace', {
369
  text: 'Find and replace',
370
- shortcut: 'Ctrl+F',
371
  onclick: showDialog,
372
  separator: 'before',
373
  context: 'edit'
@@ -375,18 +375,18 @@
375
 
376
  ed.addButton('searchreplace', {
377
  tooltip: 'Find and replace',
378
- shortcut: 'Ctrl+F',
379
  onclick: showDialog
380
  });
381
 
382
  ed.addCommand("SearchReplace", showDialog);
383
- ed.shortcuts.add('Ctrl+F', '', showDialog);
384
  };
385
 
386
  function getElmIndex(elm) {
387
  var value = elm.getAttribute('data-mce-index');
388
 
389
- if (typeof(value) == "number") {
390
  return "" + value;
391
  }
392
 
367
  self.init = function(ed) {
368
  ed.addMenuItem('searchreplace', {
369
  text: 'Find and replace',
370
+ shortcut: 'Meta+F',
371
  onclick: showDialog,
372
  separator: 'before',
373
  context: 'edit'
375
 
376
  ed.addButton('searchreplace', {
377
  tooltip: 'Find and replace',
378
+ shortcut: 'Meta+F',
379
  onclick: showDialog
380
  });
381
 
382
  ed.addCommand("SearchReplace", showDialog);
383
+ ed.shortcuts.add('Meta+F', '', showDialog);
384
  };
385
 
386
  function getElmIndex(elm) {
387
  var value = elm.getAttribute('data-mce-index');
388
 
389
+ if (typeof value == "number") {
390
  return "" + value;
391
  }
392
 
mce/searchreplace/plugin.min.js CHANGED
@@ -1 +1 @@
1
- !function(){function a(a,b,c,d,e){function f(a,b){if(b=b||0,!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var c=a.index;if(b>0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function g(a){var b;if(3===a.nodeType)return a.data;if(n[a.nodeName]&&!m[a.nodeName])return"";if(b="",(m[a.nodeName]||o[a.nodeName])&&(b+="\n"),a=a.firstChild)do b+=g(a);while(a=a.nextSibling);return b}function h(a,b,c){var d,e,f,g,h=[],i=0,j=a,k=b.shift(),l=0;a:for(;;){if((m[j.nodeName]||o[j.nodeName])&&i++,3===j.nodeType&&(!e&&j.length+i>=k[1]?(e=j,g=k[1]-i):d&&h.push(j),!d&&j.length+i>k[0]&&(d=j,f=k[0]-i),i+=j.length),d&&e){if(j=c({startNode:d,startNodeIndex:f,endNode:e,endNodeIndex:g,innerNodes:h,match:k[2],matchIndex:l}),i-=e.length-g,d=null,e=null,h=[],k=b.shift(),l++,!k)break}else{if((!n[j.nodeName]||m[j.nodeName])&&j.firstChild){j=j.firstChild;continue}if(j.nextSibling){j=j.nextSibling;continue}}for(;;){if(j.nextSibling){j=j.nextSibling;break}if(j.parentNode===a)break a;j=j.parentNode}}}function i(a){var b;if("function"!=typeof a){var c=a.nodeType?a:l.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(l.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=l.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndex<i.length&&(d=l.createTextNode(i.data.substring(a.endNodeIndex)),e.insertBefore(d,i)),i.parentNode.removeChild(i),j}c=l.createTextNode(f.data.substring(0,a.startNodeIndex)),d=l.createTextNode(g.data.substring(a.endNodeIndex));for(var k=b(f.data.substring(a.startNodeIndex),h),m=[],n=0,o=a.innerNodes.length;o>n;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(k,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}var j,k,l,m,n,o,p=[],q=0;if(l=b.ownerDocument,m=e.getBlockElements(),n=e.getWhiteSpaceElements(),o=e.getShortEndedElements(),k=g(b)){if(a.global)for(;j=a.exec(k);)p.push(f(j,d));else j=k.match(a),p.push(f(j,d));return p.length&&(q=p.length,h(b,p,i(c))),q}}function b(b){function c(){function a(){e.statusbar.find("#next").disabled(!g(k+1).length),e.statusbar.find("#prev").disabled(!g(k-1).length)}function c(){tinymce.ui.MessageBox.alert("Could not find the specified string.",function(){e.find("#find")[0].focus()})}var d={},e=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){b.focus(),j.done()},onSubmit:function(b){var f,h,i,l;return b.preventDefault(),h=e.find("#case").checked(),l=e.find("#words").checked(),i=e.find("#find").value(),i.length?d.text==i&&d.caseState==h&&d.wholeWord==l?0===g(k+1).length?void c():(j.next(),void a()):(f=j.find(i,h,l),f||c(),e.statusbar.items().slice(1).disabled(0===f),a(),void(d={text:i,caseState:h,wholeWord:l})):(j.done(!1),void e.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",onclick:function(){e.submit()}},{text:"Replace",disabled:!0,onclick:function(){j.replace(e.find("#replace").value())||(e.statusbar.items().slice(1).disabled(!0),k=-1,d={})}},{text:"Replace all",disabled:!0,onclick:function(){j.replace(e.find("#replace").value(),!0,!0),e.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){j.prev(),a()}},{text:"Next",name:"next",disabled:!0,onclick:function(){j.next(),a()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:b.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow()}function d(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function e(c){var d,e;return e=b.dom.create("span",{"data-mce-bogus":1}),e.className="mce-match-marker",d=b.getBody(),j.done(!1),a(c,d,e,!1,b.schema)}function f(a){var b=a.parentNode;a.firstChild&&b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function g(a){var c,e=[];if(c=tinymce.toArray(b.getBody().getElementsByTagName("span")),c.length)for(var f=0;f<c.length;f++){var g=d(c[f]);null!==g&&g.length&&g===a.toString()&&e.push(c[f])}return e}function h(a){var c=k,d=b.dom;a=a!==!1,a?c++:c--,d.removeClass(g(k),"mce-match-marker-selected");var e=g(c);return e.length?(d.addClass(g(c),"mce-match-marker-selected"),b.selection.scrollIntoView(e[0]),c):-1}function i(a){a.parentNode.removeChild(a)}var j=this,k=-1;j.init=function(a){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Ctrl+F",onclick:c,separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Ctrl+F",onclick:c}),a.addCommand("SearchReplace",c),a.shortcuts.add("Ctrl+F","",c)},j.find=function(a,b,c){a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),a=c?"\\b"+a+"\\b":a;var d=e(new RegExp(a,b?"g":"gi"));return d&&(k=-1,k=h(!0)),d},j.next=function(){var a=h(!0);-1!==a&&(k=a)},j.prev=function(){var a=h(!1);-1!==a&&(k=a)},j.replace=function(a,c,e){var h,l,m,n,o,p,q=k;for(c=c!==!1,m=b.getBody(),l=tinymce.toArray(m.getElementsByTagName("span")),h=0;h<l.length;h++){var r=d(l[h]);if(null!==r&&r.length)if(n=o=parseInt(r,10),e||n===k){for(a.length?(l[h].firstChild.nodeValue=a,f(l[h])):i(l[h]);l[++h];)if(n=d(l[h]),null!==r&&r.length){if(n!==o){h--;break}i(l[h])}c&&q--}else o>k&&l[h].setAttribute("data-mce-index",o-1)}return b.undoManager.add(),k=q,c?(p=g(q+1).length>0,j.next()):(p=g(q-1).length>0,j.prev()),!e&&p},j.done=function(a){var c,e,g,h;for(e=tinymce.toArray(b.getBody().getElementsByTagName("span")),c=0;c<e.length;c++){var i=d(e[c]);null!==i&&i.length&&(i===k.toString()&&(g||(g=e[c].firstChild),h=e[c].firstChild),f(e[c]))}if(g&&h){var j=b.dom.createRng();return j.setStart(g,0),j.setEnd(h,h.data.length),a!==!1&&b.selection.setRng(j),j}}}tinymce.PluginManager.add("searchreplace",b)}();
1
+ !function(){function a(a,b,c,d,e){function f(a,b){if(b=b||0,!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var c=a.index;if(b>0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function g(a){var b;if(3===a.nodeType)return a.data;if(n[a.nodeName]&&!m[a.nodeName])return"";if(b="",(m[a.nodeName]||o[a.nodeName])&&(b+="\n"),a=a.firstChild)do b+=g(a);while(a=a.nextSibling);return b}function h(a,b,c){var d,e,f,g,h=[],i=0,j=a,k=b.shift(),l=0;a:for(;;){if((m[j.nodeName]||o[j.nodeName])&&i++,3===j.nodeType&&(!e&&j.length+i>=k[1]?(e=j,g=k[1]-i):d&&h.push(j),!d&&j.length+i>k[0]&&(d=j,f=k[0]-i),i+=j.length),d&&e){if(j=c({startNode:d,startNodeIndex:f,endNode:e,endNodeIndex:g,innerNodes:h,match:k[2],matchIndex:l}),i-=e.length-g,d=null,e=null,h=[],k=b.shift(),l++,!k)break}else{if((!n[j.nodeName]||m[j.nodeName])&&j.firstChild){j=j.firstChild;continue}if(j.nextSibling){j=j.nextSibling;continue}}for(;;){if(j.nextSibling){j=j.nextSibling;break}if(j.parentNode===a)break a;j=j.parentNode}}}function i(a){var b;if("function"!=typeof a){var c=a.nodeType?a:l.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(l.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=l.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndex<i.length&&(d=l.createTextNode(i.data.substring(a.endNodeIndex)),e.insertBefore(d,i)),i.parentNode.removeChild(i),j}c=l.createTextNode(f.data.substring(0,a.startNodeIndex)),d=l.createTextNode(g.data.substring(a.endNodeIndex));for(var k=b(f.data.substring(a.startNodeIndex),h),m=[],n=0,o=a.innerNodes.length;o>n;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(k,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}var j,k,l,m,n,o,p=[],q=0;if(l=b.ownerDocument,m=e.getBlockElements(),n=e.getWhiteSpaceElements(),o=e.getShortEndedElements(),k=g(b)){if(a.global)for(;j=a.exec(k);)p.push(f(j,d));else j=k.match(a),p.push(f(j,d));return p.length&&(q=p.length,h(b,p,i(c))),q}}function b(b){function c(){function a(){e.statusbar.find("#next").disabled(!g(k+1).length),e.statusbar.find("#prev").disabled(!g(k-1).length)}function c(){tinymce.ui.MessageBox.alert("Could not find the specified string.",function(){e.find("#find")[0].focus()})}var d={},e=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){b.focus(),j.done()},onSubmit:function(b){var f,h,i,l;return b.preventDefault(),h=e.find("#case").checked(),l=e.find("#words").checked(),i=e.find("#find").value(),i.length?d.text==i&&d.caseState==h&&d.wholeWord==l?0===g(k+1).length?void c():(j.next(),void a()):(f=j.find(i,h,l),f||c(),e.statusbar.items().slice(1).disabled(0===f),a(),void(d={text:i,caseState:h,wholeWord:l})):(j.done(!1),void e.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",onclick:function(){e.submit()}},{text:"Replace",disabled:!0,onclick:function(){j.replace(e.find("#replace").value())||(e.statusbar.items().slice(1).disabled(!0),k=-1,d={})}},{text:"Replace all",disabled:!0,onclick:function(){j.replace(e.find("#replace").value(),!0,!0),e.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){j.prev(),a()}},{text:"Next",name:"next",disabled:!0,onclick:function(){j.next(),a()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:b.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow()}function d(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function e(c){var d,e;return e=b.dom.create("span",{"data-mce-bogus":1}),e.className="mce-match-marker",d=b.getBody(),j.done(!1),a(c,d,e,!1,b.schema)}function f(a){var b=a.parentNode;a.firstChild&&b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function g(a){var c,e=[];if(c=tinymce.toArray(b.getBody().getElementsByTagName("span")),c.length)for(var f=0;f<c.length;f++){var g=d(c[f]);null!==g&&g.length&&g===a.toString()&&e.push(c[f])}return e}function h(a){var c=k,d=b.dom;a=a!==!1,a?c++:c--,d.removeClass(g(k),"mce-match-marker-selected");var e=g(c);return e.length?(d.addClass(g(c),"mce-match-marker-selected"),b.selection.scrollIntoView(e[0]),c):-1}function i(a){a.parentNode.removeChild(a)}var j=this,k=-1;j.init=function(a){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:c,separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:c}),a.addCommand("SearchReplace",c),a.shortcuts.add("Meta+F","",c)},j.find=function(a,b,c){a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),a=c?"\\b"+a+"\\b":a;var d=e(new RegExp(a,b?"g":"gi"));return d&&(k=-1,k=h(!0)),d},j.next=function(){var a=h(!0);-1!==a&&(k=a)},j.prev=function(){var a=h(!1);-1!==a&&(k=a)},j.replace=function(a,c,e){var h,l,m,n,o,p,q=k;for(c=c!==!1,m=b.getBody(),l=tinymce.toArray(m.getElementsByTagName("span")),h=0;h<l.length;h++){var r=d(l[h]);if(null!==r&&r.length)if(n=o=parseInt(r,10),e||n===k){for(a.length?(l[h].firstChild.nodeValue=a,f(l[h])):i(l[h]);l[++h];)if(n=d(l[h]),null!==r&&r.length){if(n!==o){h--;break}i(l[h])}c&&q--}else o>k&&l[h].setAttribute("data-mce-index",o-1)}return b.undoManager.add(),k=q,c?(p=g(q+1).length>0,j.next()):(p=g(q-1).length>0,j.prev()),!e&&p},j.done=function(a){var c,e,g,h;for(e=tinymce.toArray(b.getBody().getElementsByTagName("span")),c=0;c<e.length;c++){var i=d(e[c]);null!==i&&i.length&&(i===k.toString()&&(g||(g=e[c].firstChild),h=e[c].firstChild),f(e[c]))}if(g&&h){var j=b.dom.createRng();return j.setStart(g,0),j.setEnd(h,h.data.length),a!==!1&&b.selection.setRng(j),j}}}tinymce.PluginManager.add("searchreplace",b)}();
mce/table/plugin.js CHANGED
@@ -754,7 +754,7 @@ define("tinymce/tableplugin/TableGrid", [
754
  each(grid, function(row, y) {
755
  each(row, function(cell, x) {
756
  if (cell.elm == target) {
757
- pos = {x : x, y : y};
758
  return false;
759
  }
760
  });
@@ -809,7 +809,7 @@ define("tinymce/tableplugin/TableGrid", [
809
  });
810
  });
811
 
812
- return {x : maxX, y : maxY};
813
  }
814
 
815
  function setEndCell(cell) {
@@ -1057,7 +1057,7 @@ define("tinymce/tableplugin/Quirks", [
1057
  }
1058
 
1059
  function getChildForDirection(parent, up) {
1060
- var child = parent && parent[up ? 'lastChild' : 'firstChild'];
1061
  // BR is not a valid table child to return in this case we return the table cell
1062
  return child && child.nodeName === 'BR' ? editor.dom.getParent(child, 'td,th') : child;
1063
  }
@@ -1513,6 +1513,8 @@ define("tinymce/tableplugin/CellSelection", [
1513
  * Contributing: http://www.tinymce.com/contributing
1514
  */
1515
 
 
 
1516
  /**
1517
  * ...
1518
  *
@@ -1671,23 +1673,43 @@ define("tinymce/tableplugin/Dialogs", [
1671
  data.style = dom.serializeStyle(css);
1672
  }
1673
 
 
 
 
 
 
 
 
 
 
 
1674
  self.tableProps = function() {
1675
  self.table(true);
1676
  };
1677
 
1678
  self.table = function(isProps) {
1679
- var dom = editor.dom, tableElm, colsCtrl, rowsCtrl, classListCtrl, data = {}, generalTableForm;
1680
 
1681
  function onSubmitTableForm() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1682
  var captionElm;
1683
 
1684
  updateStyle(dom, this);
1685
  data = Tools.extend(data, this.toJSON());
1686
 
1687
- Tools.each('backgroundColor borderColor'.split(' '), function(name) {
1688
- delete data[name];
1689
- });
1690
-
1691
  if (data["class"] === false) {
1692
  delete data["class"];
1693
  }
@@ -1698,14 +1720,35 @@ define("tinymce/tableplugin/Dialogs", [
1698
  }
1699
 
1700
  editor.dom.setAttribs(tableElm, {
1701
- cellspacing: data.cellspacing,
1702
- cellpadding: data.cellpadding,
1703
- border: data.border,
1704
  style: data.style,
1705
  'class': data['class']
1706
  });
1707
 
1708
- if (dom.getAttrib(tableElm, 'width')) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1709
  dom.setAttrib(tableElm, 'width', removePxSuffix(data.width));
1710
  } else {
1711
  dom.setStyle(tableElm, 'width', addSizeSuffix(data.width));
@@ -1725,7 +1768,6 @@ define("tinymce/tableplugin/Dialogs", [
1725
  captionElm.innerHTML = !Env.ie ? '<br data-mce-bogus="1"/>' : '\u00a0';
1726
  tableElm.insertBefore(captionElm, tableElm.firstChild);
1727
  }
1728
-
1729
  unApplyAlign(tableElm);
1730
  if (data.align) {
1731
  editor.formatter.apply('align' + data.align, {}, tableElm);
@@ -1736,6 +1778,30 @@ define("tinymce/tableplugin/Dialogs", [
1736
  });
1737
  }
1738
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1739
  if (isProps === true) {
1740
  tableElm = dom.getParent(editor.selection.getStart(), 'table');
1741
 
@@ -1743,9 +1809,13 @@ define("tinymce/tableplugin/Dialogs", [
1743
  data = {
1744
  width: removePxSuffix(dom.getStyle(tableElm, 'width') || dom.getAttrib(tableElm, 'width')),
1745
  height: removePxSuffix(dom.getStyle(tableElm, 'height') || dom.getAttrib(tableElm, 'height')),
1746
- cellspacing: tableElm ? dom.getAttrib(tableElm, 'cellspacing') : '',
1747
- cellpadding: tableElm ? dom.getAttrib(tableElm, 'cellpadding') : '',
1748
- border: tableElm ? dom.getAttrib(tableElm, 'border') : '',
 
 
 
 
1749
  caption: !!dom.select('caption', tableElm)[0],
1750
  'class': dom.getAttrib(tableElm, 'class')
1751
  };
@@ -1800,7 +1870,7 @@ define("tinymce/tableplugin/Dialogs", [
1800
  type: 'textbox',
1801
  maxWidth: 50
1802
  },
1803
- items: [
1804
  colsCtrl,
1805
  rowsCtrl,
1806
  {label: 'Width', name: 'width'},
@@ -1809,6 +1879,11 @@ define("tinymce/tableplugin/Dialogs", [
1809
  {label: 'Cell padding', name: 'cellpadding'},
1810
  {label: 'Border', name: 'border'},
1811
  {label: 'Caption', name: 'caption', type: 'checkbox'}
 
 
 
 
 
1812
  ]
1813
  },
1814
 
@@ -2559,6 +2634,20 @@ define("tinymce/tableplugin/Plugin", [
2559
  self.cellSelection = new CellSelection(editor);
2560
  });
2561
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2562
  // Register action commands
2563
  each({
2564
  mceTableSplitCells: function(grid) {
754
  each(grid, function(row, y) {
755
  each(row, function(cell, x) {
756
  if (cell.elm == target) {
757
+ pos = {x: x, y: y};
758
  return false;
759
  }
760
  });
809
  });
810
  });
811
 
812
+ return {x: maxX, y: maxY};
813
  }
814
 
815
  function setEndCell(cell) {
1057
  }
1058
 
1059
  function getChildForDirection(parent, up) {
1060
+ var child = parent && parent[up ? 'lastChild' : 'firstChild'];
1061
  // BR is not a valid table child to return in this case we return the table cell
1062
  return child && child.nodeName === 'BR' ? editor.dom.getParent(child, 'td,th') : child;
1063
  }
1513
  * Contributing: http://www.tinymce.com/contributing
1514
  */
1515
 
1516
+ /*eslint dot-notation:0*/
1517
+
1518
  /**
1519
  * ...
1520
  *
1673
  data.style = dom.serializeStyle(css);
1674
  }
1675
 
1676
+ function mergeStyles(dom, elm, styles) {
1677
+ var css = dom.parseStyle(dom.getAttrib(elm, 'style'));
1678
+
1679
+ each(styles, function(style) {
1680
+ css[style.name] = style.value;
1681
+ });
1682
+
1683
+ dom.setAttrib(elm, 'style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
1684
+ }
1685
+
1686
  self.tableProps = function() {
1687
  self.table(true);
1688
  };
1689
 
1690
  self.table = function(isProps) {
1691
+ var dom = editor.dom, tableElm, colsCtrl, rowsCtrl, classListCtrl, data = {}, generalTableForm, stylesToMerge;
1692
 
1693
  function onSubmitTableForm() {
1694
+
1695
+ //Explore the layers of the table till we find the first layer of tds or ths
1696
+ function styleTDTH (elm, name, value) {
1697
+ if (elm.tagName === "TD" || elm.tagName === "TH") {
1698
+ dom.setStyle(elm, name, value);
1699
+ } else {
1700
+ if (elm.children) {
1701
+ for (var i = 0; i < elm.children.length; i++) {
1702
+ styleTDTH(elm.children[i], name, value);
1703
+ }
1704
+ }
1705
+ }
1706
+ }
1707
+
1708
  var captionElm;
1709
 
1710
  updateStyle(dom, this);
1711
  data = Tools.extend(data, this.toJSON());
1712
 
 
 
 
 
1713
  if (data["class"] === false) {
1714
  delete data["class"];
1715
  }
1720
  }
1721
 
1722
  editor.dom.setAttribs(tableElm, {
 
 
 
1723
  style: data.style,
1724
  'class': data['class']
1725
  });
1726
 
1727
+ if (editor.settings.table_style_by_css) {
1728
+ stylesToMerge = [];
1729
+ stylesToMerge.push({name: 'border', value: data.border});
1730
+ stylesToMerge.push({name: 'border-spacing', value: addSizeSuffix(data.cellspacing)});
1731
+ mergeStyles(dom, tableElm, stylesToMerge);
1732
+ dom.setAttribs(tableElm, {
1733
+ 'data-mce-border-color': data.borderColor,
1734
+ 'data-mce-cell-padding': data.cellpadding,
1735
+ 'data-mce-border': data.border
1736
+ });
1737
+ if (tableElm.children) {
1738
+ for (var i = 0; i < tableElm.children.length; i++) {
1739
+ styleTDTH(tableElm.children[i], 'border', data.border);
1740
+ styleTDTH(tableElm.children[i], 'padding', addSizeSuffix(data.cellpadding));
1741
+ }
1742
+ }
1743
+ } else {
1744
+ editor.dom.setAttribs(tableElm, {
1745
+ border: data.border,
1746
+ cellpadding: data.cellpadding,
1747
+ cellspacing: data.cellspacing
1748
+ });
1749
+ }
1750
+
1751
+ if (dom.getAttrib(tableElm, 'width') && !editor.settings.table_style_by_css) {
1752
  dom.setAttrib(tableElm, 'width', removePxSuffix(data.width));
1753
  } else {
1754
  dom.setStyle(tableElm, 'width', addSizeSuffix(data.width));
1768
  captionElm.innerHTML = !Env.ie ? '<br data-mce-bogus="1"/>' : '\u00a0';
1769
  tableElm.insertBefore(captionElm, tableElm.firstChild);
1770
  }
 
1771
  unApplyAlign(tableElm);
1772
  if (data.align) {
1773
  editor.formatter.apply('align' + data.align, {}, tableElm);
1778
  });
1779
  }
1780
 
1781
+ function getTDTHOverallStyle (elm, name) {
1782
+ var cells = editor.dom.select("td,th", elm), firstChildStyle;
1783
+
1784
+ function checkChildren(firstChildStyle, elms) {
1785
+
1786
+ for (var i = 0; i < elms.length; i++) {
1787
+ var currentStyle = dom.getStyle(elms[i], name);
1788
+ if (typeof firstChildStyle === "undefined") {
1789
+ firstChildStyle = currentStyle;
1790
+ }
1791
+ if (firstChildStyle != currentStyle) {
1792
+ return "";
1793
+ }
1794
+ }
1795
+
1796
+ return firstChildStyle;
1797
+
1798
+ }
1799
+
1800
+ firstChildStyle = checkChildren(firstChildStyle, cells);
1801
+
1802
+ return firstChildStyle;
1803
+ }
1804
+
1805
  if (isProps === true) {
1806
  tableElm = dom.getParent(editor.selection.getStart(), 'table');
1807
 
1809
  data = {
1810
  width: removePxSuffix(dom.getStyle(tableElm, 'width') || dom.getAttrib(tableElm, 'width')),
1811
  height: removePxSuffix(dom.getStyle(tableElm, 'height') || dom.getAttrib(tableElm, 'height')),
1812
+ cellspacing: removePxSuffix(dom.getStyle(tableElm, 'border-spacing') ||
1813
+ dom.getAttrib(tableElm, 'cellspacing')),
1814
+ cellpadding: dom.getAttrib(tableElm, 'data-mce-cell-padding') || dom.getAttrib(tableElm, 'cellpadding') ||
1815
+ getTDTHOverallStyle(tableElm, 'padding'),
1816
+ border: dom.getAttrib(tableElm, 'data-mce-border') || dom.getAttrib(tableElm, 'border') ||
1817
+ getTDTHOverallStyle(tableElm, 'border'),
1818
+ borderColor: dom.getAttrib(tableElm, 'data-mce-border-color'),
1819
  caption: !!dom.select('caption', tableElm)[0],
1820
  'class': dom.getAttrib(tableElm, 'class')
1821
  };
1870
  type: 'textbox',
1871
  maxWidth: 50
1872
  },
1873
+ items: (editor.settings.table_appearance_options !== false) ? [
1874
  colsCtrl,
1875
  rowsCtrl,
1876
  {label: 'Width', name: 'width'},
1879
  {label: 'Cell padding', name: 'cellpadding'},
1880
  {label: 'Border', name: 'border'},
1881
  {label: 'Caption', name: 'caption', type: 'checkbox'}
1882
+ ] : [
1883
+ colsCtrl,
1884
+ rowsCtrl,
1885
+ {label: 'Width', name: 'width'},
1886
+ {label: 'Height', name: 'height'}
1887
  ]
1888
  },
1889
 
2634
  self.cellSelection = new CellSelection(editor);
2635
  });
2636
 
2637
+ editor.on('PreInit', function() {
2638
+ // Remove internal data attributes
2639
+ editor.serializer.addAttributeFilter(
2640
+ 'data-mce-cell-padding,data-mce-border,data-mce-border-color',
2641
+ function(nodes, name) {
2642
+
2643
+ var i = nodes.length;
2644
+
2645
+ while (i--) {
2646
+ nodes[i].attr(name, null);
2647
+ }
2648
+ });
2649
+ });
2650
+
2651
  // Register action commands
2652
  each({
2653
  mceTableSplitCells: function(grid) {
mce/table/plugin.min.js CHANGED
@@ -1 +1 @@
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/TableGrid",["tinymce/util/Tools","tinymce/Env"],function(a,c){function d(a,b){return parseInt(a.getAttribute(b)||1,10)}var e=a.each;return function(f,g){function h(){var a=0;F=[],G=0,e(["thead","tbody","tfoot"],function(b){var c=L.select("> "+b+" tr",g);e(c,function(c,f){f+=a,e(L.select("> td, > th",c),function(a,c){var e,g,h,i;if(F[f])for(;F[f][c];)c++;for(h=d(a,"rowspan"),i=d(a,"colspan"),g=f;f+h>g;g++)for(F[g]||(F[g]=[]),e=c;c+i>e;e++)F[g][e]={part:b,real:g==f&&e==c,elm:a,rowspan:h,colspan:i};G=Math.max(G,c+1)})}),a+=c.length})}function i(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function j(a,b){var c;return c=F[b],c?c[a]:void 0}function k(a,b,c){a&&(c=parseInt(c,10),1===c?a.removeAttribute(b,1):a.setAttribute(b,c,1))}function l(a){return a&&(L.hasClass(a.elm,"mce-item-selected")||a==J)}function m(){var a=[];return e(g.rows,function(b){e(b.cells,function(c){return L.hasClass(c,"mce-item-selected")||J&&c==J.elm?(a.push(b),!1):void 0})}),a}function n(){var a=L.createRng();a.setStartAfter(g),a.setEndAfter(g),K.setRng(a),L.remove(g)}function o(b){var d,g={};return f.settings.table_clone_elements!==!1&&(g=a.makeMap((f.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 f;return 3==a.nodeType?(e(L.getParents(a.parentNode,null,b).reverse(),function(a){g[a.nodeName]&&(a=i(a,!1),d?f&&f.appendChild(a):d=f=a,f=a)}),f&&(f.innerHTML=c.ie?"&nbsp;":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),b=i(b,!1),k(b,"rowSpan",1),k(b,"colSpan",1),d?b.appendChild(d):(!c.ie||c.ie>10)&&(b.innerHTML='<br data-mce-bogus="1" />'),b}function p(){var a,b=L.createRng();return e(L.select("tr",g),function(a){0===a.cells.length&&L.remove(a)}),0===L.select("tr",g).length?(b.setStartBefore(g),b.setEndBefore(g),K.setRng(b),void L.remove(g)):(e(L.select("thead,tbody,tfoot",g),function(a){0===a.rows.length&&L.remove(a)}),h(),void(H&&(a=F[Math.min(F.length-1,H.y)],a&&(K.select(a[Math.min(a.length-1,H.x)].elm,!0),K.collapse(!0)))))}function q(a,b,c,d){var e,f,g,h,i;for(e=F[b][a].elm.parentNode,g=1;c>=g;g++)if(e=L.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=F[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)L.insertAfter(o(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(o(e.cells[0]),e.cells[0])}}function r(){e(F,function(a,b){e(a,function(a,c){var e,f,g;if(l(a)&&(a=a.elm,e=d(a,"colspan"),f=d(a,"rowspan"),e>1||f>1)){for(k(a,"rowSpan",1),k(a,"colSpan",1),g=0;e-1>g;g++)L.insertAfter(o(a),a);q(c,b,f-1,e)}})})}function s(b,c,d){var f,g,i,m,n,o,q,s,t,u,v;if(b?(f=A(b),g=f.x,i=f.y,m=g+(c-1),n=i+(d-1)):(H=I=null,e(F,function(a,b){e(a,function(a,c){l(a)&&(H||(H={x:c,y:b}),I={x:c,y:b})})}),H&&(g=H.x,i=H.y,m=I.x,n=I.y)),s=j(g,i),t=j(m,n),s&&t&&s.part==t.part){for(r(),h(),s=j(g,i).elm,k(s,"colSpan",m-g+1),k(s,"rowSpan",n-i+1),q=i;n>=q;q++)for(o=g;m>=o;o++)F[q]&&F[q][o]&&(b=F[q][o].elm,b!=s&&(u=a.grep(b.childNodes),e(u,function(a){s.appendChild(a)}),u.length&&(u=a.grep(s.childNodes),v=0,e(u,function(a){"BR"==a.nodeName&&L.getAttrib(a,"data-mce-bogus")&&v++<u.length-1&&s.removeChild(a)})),L.remove(b)));p()}}function t(a){var c,f,g,h,j,m,n,p,q;if(e(F,function(b,d){return e(b,function(b){return l(b)&&(b=b.elm,j=b.parentNode,m=i(j,!1),c=d,a)?!1:void 0}),a?!c:void 0}),c!==b){for(h=0;h<F[0].length;h++)if(F[c][h]&&(f=F[c][h].elm,f!=g)){if(a){if(c>0&&F[c-1][h]&&(p=F[c-1][h].elm,q=d(p,"rowSpan"),q>1)){k(p,"rowSpan",q+1);continue}}else if(q=d(f,"rowspan"),q>1){k(f,"rowSpan",q+1);continue}n=o(f),k(n,"colSpan",f.colSpan),m.appendChild(n),g=f}m.hasChildNodes()&&(a?j.parentNode.insertBefore(m,j):L.insertAfter(m,j))}}function u(a){var b,c;e(F,function(c){return e(c,function(c,d){return l(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),e(F,function(e,f){var g,h,i;e[b]&&(g=e[b].elm,g!=c&&(i=d(g,"colspan"),h=d(g,"rowspan"),1==i?a?(g.parentNode.insertBefore(o(g),g),q(b,f,h-1,i)):(L.insertAfter(o(g),g),q(b,f,h-1,i)):k(g,"colSpan",g.colSpan+1),c=g))})}function v(){var b=[];e(F,function(c){e(c,function(c,f){l(c)&&-1===a.inArray(b,f)&&(e(F,function(a){var b,c=a[f].elm;b=d(c,"colSpan"),b>1?k(c,"colSpan",b-1):L.remove(c)}),b.push(f))})}),p()}function w(){function a(a){var b,c;e(a.cells,function(a){var c=d(a,"rowSpan");c>1&&(k(a,"rowSpan",c-1),b=A(a),q(b.x,b.y,1,1))}),b=A(a.cells[0]),e(F[b.y],function(a){var b;a=a.elm,a!=c&&(b=d(a,"rowSpan"),1>=b?L.remove(a):k(a,"rowSpan",b-1),c=a)})}var b;b=m(),e(b.reverse(),function(b){a(b)}),p()}function x(){var a=m();return L.remove(a),p(),a}function y(){var a=m();return e(a,function(b,c){a[c]=i(b,!0)}),a}function z(a,b){var c=m(),d=c[b?0:c.length-1],f=d.cells.length;a&&(e(F,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(c=0;g>c;c++)e=a.cells[c],k(e,"colSpan",1),k(e,"rowSpan",1);for(c=g;f>c;c++)a.appendChild(o(a.cells[g-1]));for(c=f;g>c;c++)L.remove(a.cells[c]);b?d.parentNode.insertBefore(a,d):L.insertAfter(a,d)}),L.removeClass(L.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function A(a){var b;return e(F,function(c,d){return e(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function B(a){H=A(a)}function C(){var a,b;return a=b=0,e(F,function(c,d){e(c,function(c,e){var f,g;l(c)&&(c=F[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 D(a){var b,c,d,e,f,g,h,i,j,k;if(I=A(a),H&&I){for(b=Math.min(H.x,I.x),c=Math.min(H.y,I.y),d=Math.max(H.x,I.x),e=Math.max(H.y,I.y),f=d,g=e,k=c;g>=k;k++)a=F[k][b],a.real||b-(a.colspan-1)<b&&(b-=a.colspan-1);for(j=b;f>=j;j++)a=F[c][j],a.real||c-(a.rowspan-1)<c&&(c-=a.rowspan-1);for(k=c;e>=k;k++)for(j=b;d>=j;j++)a=F[k][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&k+i>g&&(g=k+i));for(L.removeClass(L.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),k=c;g>=k;k++)for(j=b;f>=j;j++)F[k][j]&&L.addClass(F[k][j].elm,"mce-item-selected")}}function E(a,b){var c,d,e;c=A(a),d=c.y*G+c.x;do{if(d+=b,e=j(d%G,Math.floor(d/G)),!e)break;if(e.elm!=a)return K.select(e.elm,!0),L.isEmpty(e.elm)&&K.collapse(!0),!0}while(e.elm==a);return!1}var F,G,H,I,J,K=f.selection,L=K.dom;g=g||L.getParent(K.getStart(),"table"),h(),J=L.getParent(K.getStart(),"th,td"),J&&(H=A(J),I=C(),J=j(H.x,H.y)),a.extend(this,{deleteTable:n,split:r,merge:s,insertRow:t,insertCol:u,deleteCols:v,deleteRows:w,cutRows:x,copyRows:y,pasteRows:z,getPos:A,setStartCell:B,setEndCell:D,moveRelIdx:E,refresh:h})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/Env","tinymce/util/Tools"],function(a,b,c){function d(a,b){return parseInt(a.getAttribute(b)||1,10)}var e=c.each;return function(c){function f(){function b(b){function f(a,d){var e=a?"previousSibling":"nextSibling",f=c.dom.getParent(d,"tr"),h=f[e];if(h)return q(c,d,h,a),b.preventDefault(),!0;var k=c.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=g(a,k,l,"tbody");if(null!==n)return i(a,n,d)}return j(a,f,e,k)}function g(a,b,d,e){var f=c.dom.select(">"+e,b),g=f.indexOf(d);if(a&&0===g||!a&&g===f.length-1)return h(a,b);if(-1===g){var i="thead"===d.tagName.toLowerCase()?0:f.length-1;return f[i]}return f[g+(a?-1:1)]}function h(a,b){var d=a?"thead":"tfoot",e=c.dom.select(">"+d,b);return 0!==e.length?e[0]:null}function i(a,d,e){var f=k(d,a);return f&&q(c,e,f,a),b.preventDefault(),!0}function j(a,d,e,g){var h=g[e];if(h)return l(h),!0;var i=c.dom.getParent(g,"td,th");if(i)return f(a,i,b);var j=k(d,!a);return l(j),b.preventDefault(),!1}function k(a,b){var d=a&&a[b?"lastChild":"firstChild"];return d&&"BR"===d.nodeName?c.dom.getParent(d,"td,th"):d}function l(a){c.selection.setCursorLocation(a,0)}function m(){return t==a.UP||t==a.DOWN}function n(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function o(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=d(c,"colspan");return b}function p(a,b){var c=0,f=0;return e(a.children,function(a,e){return c+=d(a,"colspan"),f=e,c>b?!1:void 0}),f}function q(a,b,d,e){var f=o(c.dom.getParent(b,"td,th")),g=p(d,f),h=d.childNodes[g],i=k(h,e);l(i||h)}function r(a){var b=c.selection.getNode(),d=c.dom.getParent(b,"td,th"),e=c.dom.getParent(a,"td,th");return d&&d!==e&&s(d,e)}function s(a,b){return c.dom.getParent(a,"TABLE")===c.dom.getParent(b,"TABLE")}var t=b.keyCode;if(m()&&n(c)){var u=c.selection.getNode();setTimeout(function(){r(u)&&f(!b.shiftKey&&t===a.UP,u,b)},0)}}c.on("KeyDown",function(a){b(a)})}function g(){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}c.on("KeyDown",function(b){var d,e,f=c.dom;(37==b.keyCode||38==b.keyCode)&&(d=c.selection.getRng(),e=f.getParent(d.startContainer,"table"),e&&c.getBody().firstChild==e&&a(d,e)&&(d=f.createRng(),d.setStartBefore(e),d.setEndBefore(e),c.selection.setRng(d),b.preventDefault()))})}function h(){c.on("KeyDown SetContent VisualAid",function(){var a;for(a=c.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&&(c.settings.forced_root_block?c.dom.add(c.getBody(),c.settings.forced_root_block,c.settings.forced_root_block_attrs,b.ie&&b.ie<11?"&nbsp;":'<br data-mce-bogus="1" />'):c.dom.add(c.getBody(),"br",{"data-mce-bogus":"1"}))}),c.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&&c.dom.remove(b)})}function i(){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=c.selection.getRng(),d=c.selection.getNode(),e=c.dom.getParent(b.startContainer,"TD,TH");if(a(c,b,d,e)){e||(e=d);for(var f=e.lastChild;f.lastChild;)f=f.lastChild;3==f.nodeType&&(b.setEnd(f,f.data.length),c.selection.setRng(b))}}c.on("KeyDown",function(){b()}),c.on("MouseDown",function(a){2!=a.button&&b()})}function j(){c.on("keydown",function(b){if((b.keyCode==a.DELETE||b.keyCode==a.BACKSPACE)&&!b.isDefaultPrevented()){var d=c.dom.getParent(c.selection.getStart(),"table");if(d){for(var e=c.dom.select("td,th",d),f=e.length;f--;)if(!c.dom.hasClass(e[f],"mce-item-selected"))return;b.preventDefault(),c.execCommand("mceTableDelete")}}})}j(),b.webkit&&(f(),i()),b.gecko&&(g(),h()),b.ie>10&&(g(),h())}}),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||l)&&(d.dom.removeClass(d.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),l=!1)}function f(b){var c,e,f=b.target;if(!j&&h&&(g||f!=h)&&("TD"==f.nodeName||"TH"==f.nodeName)){e=k.getParent(f,"table"),e==i&&(g||(g=new a(d,e),g.setStartCell(h),d.getBody().style.webkitUserSelect="none"),g.setEndCell(f),l=!0),c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(m){}b.preventDefault()}}var g,h,i,j,k=d.dom,l=!0;return d.on("MouseDown",function(a){2==a.button||j||(e(),h=k.getParent(a.target,"td,th"),i=k.getParent(h,"table"))}),d.on("mouseover",f),d.on("remove",function(){k.unbind(d.getDoc(),"mouseover",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,j,l,m,n=d.selection;if(h){if(g&&(d.getBody().style.webkitUserSelect=""),f=k.select("td.mce-item-selected,th.mce-item-selected"),f.length>0){e=k.createRng(),l=f[0],e.setStartBefore(l),e.setEndAfter(l),a(l,1),j=new b(l,k.getParent(f[0],"table"));do if("TD"==l.nodeName||"TH"==l.nodeName){if(!k.hasClass(l,"mce-item-selected"))break;m=l}while(l=j.next());a(m),n.setRng(e)}d.nodeChanged(),h=g=i=null}}),d.on("KeyUp Drop SetContent",function(a){e("setcontent"==a.type),h=g=i=null,j=!1}),d.on("ObjectResizeStart ObjectResized",function(a){j="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)}var n=this;n.tableProps=function(){n.table(!0)},n.table=function(e){function j(){var c;l(s,this),t=a.extend(t,this.toJSON()),a.each("backgroundColor borderColor".split(" "),function(a){delete t[a]}),t["class"]===!1&&delete t["class"],d.undoManager.transact(function(){n||(n=d.plugins.table.insertTable(t.cols||1,t.rows||1)),d.dom.setAttribs(n,{cellspacing:t.cellspacing,cellpadding:t.cellpadding,border:t.border,style:t.style,"class":t["class"]}),s.getAttrib(n,"width")?s.setAttrib(n,"width",g(t.width)):s.setStyle(n,"width",h(t.width)),s.setStyle(n,"height",h(t.height)),c=s.select("caption",n)[0],c&&!t.caption&&s.remove(c),!c&&t.caption&&(c=s.create("caption"),c.innerHTML=b.ie?"\xa0":'<br data-mce-bogus="1"/>',n.insertBefore(c,n.firstChild)),i(n),t.align&&d.formatter.apply("align"+t.align,{},n),d.focus(),d.addVisual()})}var n,o,p,q,r,s=d.dom,t={};e===!0?(n=s.getParent(d.selection.getStart(),"table"),n&&(t={width:g(s.getStyle(n,"width")||s.getAttrib(n,"width")),height:g(s.getStyle(n,"height")||s.getAttrib(n,"height")),cellspacing:n?s.getAttrib(n,"cellspacing"):"",cellpadding:n?s.getAttrib(n,"cellpadding"):"",border:n?s.getAttrib(n,"border"):"",caption:!!s.select("caption",n)[0],"class":s.getAttrib(n,"class")},c("left center right".split(" "),function(a){d.formatter.matchNode(n,"align"+a)&&(t.align=a)}))):(o={label:"Cols",name:"cols"},p={label:"Rows",name:"rows"}),d.settings.table_class_list&&(t["class"]&&(t["class"]=t["class"].replace(/\s*mce\-item\-table\s*/g,"")),q={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]})})})}),r={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:[o,p,{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"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},q]},d.settings.table_advtab!==!1?(m(s,t,n),d.windowManager.open({title:"Table properties",data:t,bodyType:"tabpanel",body:[{title:"General",type:"form",items:r},f(s)],onsubmit:j})):d.windowManager.open({title:"Table properties",data:t,body:r,onsubmit:j})},n.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)})}})},n.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.mce-item-selected,th.mce-item-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})}},n.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.hasClass(b,"mce-item-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/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(a,b,c,d,e,f,g,h){function i(e){function f(a){return function(){e.execCommand(a)}}function h(a,b){var c,d,f,h;for(f='<table id="__mce"><tbody>',c=0;b>c;c++){for(f+="<tr>",d=0;a>d;d++)f+="<td>"+(g.ie?" ":"<br>")+"</td>";f+="</tr>"}return f+="</tbody></table>",e.undoManager.transact(function(){e.insertContent(f),h=e.dom.get("__mce"),e.dom.setAttrib(h,"id",null),e.dom.setAttribs(h,e.settings.table_default_attributes||{}),e.dom.setStyles(h,e.settings.table_default_styles||{})}),h}function i(a,b){function c(){a.disabled(!e.dom.getParent(e.selection.getStart(),b)),e.selection.selectorChanged(b,function(b){a.disabled(!b)})}e.initialized?c():e.on("init",c)}function k(){i(this,"table")}function l(){i(this,"td,th")}function m(){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 n(a,b,c){var d,f,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),f=0;10>f;f++)for(d=0;10>d;d++)h=j.rows[f].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=f,e.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}var o,p=this,q=new d(e);e.settings.table_grid===!1?e.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:q.table}):e.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),q.table())},onshow:function(){n(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");e.dom.removeClass(a,"mce-active"),e.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:m(),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)&&(n(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(),e.undoManager.transact(function(){h(b.lastX+1,b.lastY+1)}),e.addVisual())}}]}),e.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:k,onclick:q.tableProps}),e.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:k,cmd:"mceTableDelete"}),e.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:f("mceTableCellProps"),onPostRender:l},{text:"Merge cells",onclick:f("mceTableMergeCells"),onPostRender:l},{text:"Split cell",onclick:f("mceTableSplitCells"),onPostRender:l}]}),e.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:f("mceTableInsertRowBefore"),onPostRender:l},{text:"Insert row after",onclick:f("mceTableInsertRowAfter"),onPostRender:l},{text:"Delete row",onclick:f("mceTableDeleteRow"),onPostRender:l},{text:"Row properties",onclick:f("mceTableRowProps"),onPostRender:l},{text:"-"},{text:"Cut row",onclick:f("mceTableCutRow"),onPostRender:l},{text:"Copy row",onclick:f("mceTableCopyRow"),onPostRender:l},{text:"Paste row before",onclick:f("mceTablePasteRowBefore"),onPostRender:l},{text:"Paste row after",onclick:f("mceTablePasteRowAfter"),onPostRender:l}]}),e.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:f("mceTableInsertColBefore"),onPostRender:l},{text:"Insert column after",onclick:f("mceTableInsertColAfter"),onPostRender:l},{text:"Delete column",onclick:f("mceTableDeleteCol"),onPostRender:l}]});var r=[];j("inserttable tableprops deletetable | cell row column".split(" "),function(a){r.push("|"==a?{text:"-"}:e.menuItems[a])}),e.addButton("table",{type:"menubutton",title:"Table",menu:r}),g.isIE||e.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(e.selection.select(a),e.nodeChanged())}),p.quirks=new b(e),e.on("Init",function(){p.cellSelection=new c(e)}),j({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=e.dom.getParent(e.selection.getStart(),"th,td"),e.dom.select("td.mce-item-selected,th.mce-item-selected").length?a.merge():q.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){o=a.cutRows()},mceTableCopyRow:function(a){o=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(o,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(o)},mceTableDelete:function(a){a.deleteTable()}},function(b,c){e.addCommand(c,function(){var c=new a(e);c&&(b(c),e.execCommand("mceRepaint"),p.cellSelection.clear())})}),j({mceInsertTable:q.table,mceTableProps:function(){q.table(!0)},mceTableRowProps:q.row,mceTableCellProps:q.cell},function(a,b){e.addCommand(b,function(b,c){a(c)})}),e.settings.table_tab_navigation!==!1&&e.on("keydown",function(b){var c,d,f;9==b.keyCode&&(c=e.dom.getParent(e.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(e),f=b.shiftKey?-1:1,e.undoManager.transact(function(){!d.moveRelIdx(c,f)&&f>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,f))})))}),p.insertTable=h}var j=e.each;h.add("table",i)})}(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/TableGrid",["tinymce/util/Tools","tinymce/Env"],function(a,c){function d(a,b){return parseInt(a.getAttribute(b)||1,10)}var e=a.each;return function(f,g){function h(){var a=0;F=[],G=0,e(["thead","tbody","tfoot"],function(b){var c=L.select("> "+b+" tr",g);e(c,function(c,f){f+=a,e(L.select("> td, > th",c),function(a,c){var e,g,h,i;if(F[f])for(;F[f][c];)c++;for(h=d(a,"rowspan"),i=d(a,"colspan"),g=f;f+h>g;g++)for(F[g]||(F[g]=[]),e=c;c+i>e;e++)F[g][e]={part:b,real:g==f&&e==c,elm:a,rowspan:h,colspan:i};G=Math.max(G,c+1)})}),a+=c.length})}function i(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function j(a,b){var c;return c=F[b],c?c[a]:void 0}function k(a,b,c){a&&(c=parseInt(c,10),1===c?a.removeAttribute(b,1):a.setAttribute(b,c,1))}function l(a){return a&&(L.hasClass(a.elm,"mce-item-selected")||a==J)}function m(){var a=[];return e(g.rows,function(b){e(b.cells,function(c){return L.hasClass(c,"mce-item-selected")||J&&c==J.elm?(a.push(b),!1):void 0})}),a}function n(){var a=L.createRng();a.setStartAfter(g),a.setEndAfter(g),K.setRng(a),L.remove(g)}function o(b){var d,g={};return f.settings.table_clone_elements!==!1&&(g=a.makeMap((f.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 f;return 3==a.nodeType?(e(L.getParents(a.parentNode,null,b).reverse(),function(a){g[a.nodeName]&&(a=i(a,!1),d?f&&f.appendChild(a):d=f=a,f=a)}),f&&(f.innerHTML=c.ie?"&nbsp;":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),b=i(b,!1),k(b,"rowSpan",1),k(b,"colSpan",1),d?b.appendChild(d):(!c.ie||c.ie>10)&&(b.innerHTML='<br data-mce-bogus="1" />'),b}function p(){var a,b=L.createRng();return e(L.select("tr",g),function(a){0===a.cells.length&&L.remove(a)}),0===L.select("tr",g).length?(b.setStartBefore(g),b.setEndBefore(g),K.setRng(b),void L.remove(g)):(e(L.select("thead,tbody,tfoot",g),function(a){0===a.rows.length&&L.remove(a)}),h(),void(H&&(a=F[Math.min(F.length-1,H.y)],a&&(K.select(a[Math.min(a.length-1,H.x)].elm,!0),K.collapse(!0)))))}function q(a,b,c,d){var e,f,g,h,i;for(e=F[b][a].elm.parentNode,g=1;c>=g;g++)if(e=L.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=F[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)L.insertAfter(o(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(o(e.cells[0]),e.cells[0])}}function r(){e(F,function(a,b){e(a,function(a,c){var e,f,g;if(l(a)&&(a=a.elm,e=d(a,"colspan"),f=d(a,"rowspan"),e>1||f>1)){for(k(a,"rowSpan",1),k(a,"colSpan",1),g=0;e-1>g;g++)L.insertAfter(o(a),a);q(c,b,f-1,e)}})})}function s(b,c,d){var f,g,i,m,n,o,q,s,t,u,v;if(b?(f=A(b),g=f.x,i=f.y,m=g+(c-1),n=i+(d-1)):(H=I=null,e(F,function(a,b){e(a,function(a,c){l(a)&&(H||(H={x:c,y:b}),I={x:c,y:b})})}),H&&(g=H.x,i=H.y,m=I.x,n=I.y)),s=j(g,i),t=j(m,n),s&&t&&s.part==t.part){for(r(),h(),s=j(g,i).elm,k(s,"colSpan",m-g+1),k(s,"rowSpan",n-i+1),q=i;n>=q;q++)for(o=g;m>=o;o++)F[q]&&F[q][o]&&(b=F[q][o].elm,b!=s&&(u=a.grep(b.childNodes),e(u,function(a){s.appendChild(a)}),u.length&&(u=a.grep(s.childNodes),v=0,e(u,function(a){"BR"==a.nodeName&&L.getAttrib(a,"data-mce-bogus")&&v++<u.length-1&&s.removeChild(a)})),L.remove(b)));p()}}function t(a){var c,f,g,h,j,m,n,p,q;if(e(F,function(b,d){return e(b,function(b){return l(b)&&(b=b.elm,j=b.parentNode,m=i(j,!1),c=d,a)?!1:void 0}),a?!c:void 0}),c!==b){for(h=0;h<F[0].length;h++)if(F[c][h]&&(f=F[c][h].elm,f!=g)){if(a){if(c>0&&F[c-1][h]&&(p=F[c-1][h].elm,q=d(p,"rowSpan"),q>1)){k(p,"rowSpan",q+1);continue}}else if(q=d(f,"rowspan"),q>1){k(f,"rowSpan",q+1);continue}n=o(f),k(n,"colSpan",f.colSpan),m.appendChild(n),g=f}m.hasChildNodes()&&(a?j.parentNode.insertBefore(m,j):L.insertAfter(m,j))}}function u(a){var b,c;e(F,function(c){return e(c,function(c,d){return l(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),e(F,function(e,f){var g,h,i;e[b]&&(g=e[b].elm,g!=c&&(i=d(g,"colspan"),h=d(g,"rowspan"),1==i?a?(g.parentNode.insertBefore(o(g),g),q(b,f,h-1,i)):(L.insertAfter(o(g),g),q(b,f,h-1,i)):k(g,"colSpan",g.colSpan+1),c=g))})}function v(){var b=[];e(F,function(c){e(c,function(c,f){l(c)&&-1===a.inArray(b,f)&&(e(F,function(a){var b,c=a[f].elm;b=d(c,"colSpan"),b>1?k(c,"colSpan",b-1):L.remove(c)}),b.push(f))})}),p()}function w(){function a(a){var b,c;e(a.cells,function(a){var c=d(a,"rowSpan");c>1&&(k(a,"rowSpan",c-1),b=A(a),q(b.x,b.y,1,1))}),b=A(a.cells[0]),e(F[b.y],function(a){var b;a=a.elm,a!=c&&(b=d(a,"rowSpan"),1>=b?L.remove(a):k(a,"rowSpan",b-1),c=a)})}var b;b=m(),e(b.reverse(),function(b){a(b)}),p()}function x(){var a=m();return L.remove(a),p(),a}function y(){var a=m();return e(a,function(b,c){a[c]=i(b,!0)}),a}function z(a,b){var c=m(),d=c[b?0:c.length-1],f=d.cells.length;a&&(e(F,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(c=0;g>c;c++)e=a.cells[c],k(e,"colSpan",1),k(e,"rowSpan",1);for(c=g;f>c;c++)a.appendChild(o(a.cells[g-1]));for(c=f;g>c;c++)L.remove(a.cells[c]);b?d.parentNode.insertBefore(a,d):L.insertAfter(a,d)}),L.removeClass(L.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function A(a){var b;return e(F,function(c,d){return e(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function B(a){H=A(a)}function C(){var a,b;return a=b=0,e(F,function(c,d){e(c,function(c,e){var f,g;l(c)&&(c=F[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 D(a){var b,c,d,e,f,g,h,i,j,k;if(I=A(a),H&&I){for(b=Math.min(H.x,I.x),c=Math.min(H.y,I.y),d=Math.max(H.x,I.x),e=Math.max(H.y,I.y),f=d,g=e,k=c;g>=k;k++)a=F[k][b],a.real||b-(a.colspan-1)<b&&(b-=a.colspan-1);for(j=b;f>=j;j++)a=F[c][j],a.real||c-(a.rowspan-1)<c&&(c-=a.rowspan-1);for(k=c;e>=k;k++)for(j=b;d>=j;j++)a=F[k][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&k+i>g&&(g=k+i));for(L.removeClass(L.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),k=c;g>=k;k++)for(j=b;f>=j;j++)F[k][j]&&L.addClass(F[k][j].elm,"mce-item-selected")}}function E(a,b){var c,d,e;c=A(a),d=c.y*G+c.x;do{if(d+=b,e=j(d%G,Math.floor(d/G)),!e)break;if(e.elm!=a)return K.select(e.elm,!0),L.isEmpty(e.elm)&&K.collapse(!0),!0}while(e.elm==a);return!1}var F,G,H,I,J,K=f.selection,L=K.dom;g=g||L.getParent(K.getStart(),"table"),h(),J=L.getParent(K.getStart(),"th,td"),J&&(H=A(J),I=C(),J=j(H.x,H.y)),a.extend(this,{deleteTable:n,split:r,merge:s,insertRow:t,insertCol:u,deleteCols:v,deleteRows:w,cutRows:x,copyRows:y,pasteRows:z,getPos:A,setStartCell:B,setEndCell:D,moveRelIdx:E,refresh:h})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/Env","tinymce/util/Tools"],function(a,b,c){function d(a,b){return parseInt(a.getAttribute(b)||1,10)}var e=c.each;return function(c){function f(){function b(b){function f(a,d){var e=a?"previousSibling":"nextSibling",f=c.dom.getParent(d,"tr"),h=f[e];if(h)return q(c,d,h,a),b.preventDefault(),!0;var k=c.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=g(a,k,l,"tbody");if(null!==n)return i(a,n,d)}return j(a,f,e,k)}function g(a,b,d,e){var f=c.dom.select(">"+e,b),g=f.indexOf(d);if(a&&0===g||!a&&g===f.length-1)return h(a,b);if(-1===g){var i="thead"===d.tagName.toLowerCase()?0:f.length-1;return f[i]}return f[g+(a?-1:1)]}function h(a,b){var d=a?"thead":"tfoot",e=c.dom.select(">"+d,b);return 0!==e.length?e[0]:null}function i(a,d,e){var f=k(d,a);return f&&q(c,e,f,a),b.preventDefault(),!0}function j(a,d,e,g){var h=g[e];if(h)return l(h),!0;var i=c.dom.getParent(g,"td,th");if(i)return f(a,i,b);var j=k(d,!a);return l(j),b.preventDefault(),!1}function k(a,b){var d=a&&a[b?"lastChild":"firstChild"];return d&&"BR"===d.nodeName?c.dom.getParent(d,"td,th"):d}function l(a){c.selection.setCursorLocation(a,0)}function m(){return t==a.UP||t==a.DOWN}function n(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function o(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=d(c,"colspan");return b}function p(a,b){var c=0,f=0;return e(a.children,function(a,e){return c+=d(a,"colspan"),f=e,c>b?!1:void 0}),f}function q(a,b,d,e){var f=o(c.dom.getParent(b,"td,th")),g=p(d,f),h=d.childNodes[g],i=k(h,e);l(i||h)}function r(a){var b=c.selection.getNode(),d=c.dom.getParent(b,"td,th"),e=c.dom.getParent(a,"td,th");return d&&d!==e&&s(d,e)}function s(a,b){return c.dom.getParent(a,"TABLE")===c.dom.getParent(b,"TABLE")}var t=b.keyCode;if(m()&&n(c)){var u=c.selection.getNode();setTimeout(function(){r(u)&&f(!b.shiftKey&&t===a.UP,u,b)},0)}}c.on("KeyDown",function(a){b(a)})}function g(){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}c.on("KeyDown",function(b){var d,e,f=c.dom;(37==b.keyCode||38==b.keyCode)&&(d=c.selection.getRng(),e=f.getParent(d.startContainer,"table"),e&&c.getBody().firstChild==e&&a(d,e)&&(d=f.createRng(),d.setStartBefore(e),d.setEndBefore(e),c.selection.setRng(d),b.preventDefault()))})}function h(){c.on("KeyDown SetContent VisualAid",function(){var a;for(a=c.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&&(c.settings.forced_root_block?c.dom.add(c.getBody(),c.settings.forced_root_block,c.settings.forced_root_block_attrs,b.ie&&b.ie<11?"&nbsp;":'<br data-mce-bogus="1" />'):c.dom.add(c.getBody(),"br",{"data-mce-bogus":"1"}))}),c.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&&c.dom.remove(b)})}function i(){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=c.selection.getRng(),d=c.selection.getNode(),e=c.dom.getParent(b.startContainer,"TD,TH");if(a(c,b,d,e)){e||(e=d);for(var f=e.lastChild;f.lastChild;)f=f.lastChild;3==f.nodeType&&(b.setEnd(f,f.data.length),c.selection.setRng(b))}}c.on("KeyDown",function(){b()}),c.on("MouseDown",function(a){2!=a.button&&b()})}function j(){c.on("keydown",function(b){if((b.keyCode==a.DELETE||b.keyCode==a.BACKSPACE)&&!b.isDefaultPrevented()){var d=c.dom.getParent(c.selection.getStart(),"table");if(d){for(var e=c.dom.select("td,th",d),f=e.length;f--;)if(!c.dom.hasClass(e[f],"mce-item-selected"))return;b.preventDefault(),c.execCommand("mceTableDelete")}}})}j(),b.webkit&&(f(),i()),b.gecko&&(g(),h()),b.ie>10&&(g(),h())}}),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||l)&&(d.dom.removeClass(d.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),l=!1)}function f(b){var c,e,f=b.target;if(!j&&h&&(g||f!=h)&&("TD"==f.nodeName||"TH"==f.nodeName)){e=k.getParent(f,"table"),e==i&&(g||(g=new a(d,e),g.setStartCell(h),d.getBody().style.webkitUserSelect="none"),g.setEndCell(f),l=!0),c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(m){}b.preventDefault()}}var g,h,i,j,k=d.dom,l=!0;return d.on("MouseDown",function(a){2==a.button||j||(e(),h=k.getParent(a.target,"td,th"),i=k.getParent(h,"table"))}),d.on("mouseover",f),d.on("remove",function(){k.unbind(d.getDoc(),"mouseover",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,j,l,m,n=d.selection;if(h){if(g&&(d.getBody().style.webkitUserSelect=""),f=k.select("td.mce-item-selected,th.mce-item-selected"),f.length>0){e=k.createRng(),l=f[0],e.setStartBefore(l),e.setEndAfter(l),a(l,1),j=new b(l,k.getParent(f[0],"table"));do if("TD"==l.nodeName||"TH"==l.nodeName){if(!k.hasClass(l,"mce-item-selected"))break;m=l}while(l=j.next());a(m),n.setRng(e)}d.nodeChanged(),h=g=i=null}}),d.on("KeyUp Drop SetContent",function(a){e("setcontent"==a.type),h=g=i=null,j=!1}),d.on("ObjectResizeStart ObjectResized",function(a){j="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.mce-item-selected,th.mce-item-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.hasClass(b,"mce-item-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/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(a,b,c,d,e,f,g,h){function i(e){function f(a){return function(){e.execCommand(a)}}function h(a,b){var c,d,f,h;for(f='<table id="__mce"><tbody>',c=0;b>c;c++){for(f+="<tr>",d=0;a>d;d++)f+="<td>"+(g.ie?" ":"<br>")+"</td>";f+="</tr>"}return f+="</tbody></table>",e.undoManager.transact(function(){e.insertContent(f),h=e.dom.get("__mce"),e.dom.setAttrib(h,"id",null),e.dom.setAttribs(h,e.settings.table_default_attributes||{}),e.dom.setStyles(h,e.settings.table_default_styles||{})}),h}function i(a,b){function c(){a.disabled(!e.dom.getParent(e.selection.getStart(),b)),e.selection.selectorChanged(b,function(b){a.disabled(!b)})}e.initialized?c():e.on("init",c)}function k(){i(this,"table")}function l(){i(this,"td,th")}function m(){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 n(a,b,c){var d,f,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),f=0;10>f;f++)for(d=0;10>d;d++)h=j.rows[f].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=f,e.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}var o,p=this,q=new d(e);e.settings.table_grid===!1?e.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:q.table}):e.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),q.table())},onshow:function(){n(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");e.dom.removeClass(a,"mce-active"),e.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:m(),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)&&(n(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(),e.undoManager.transact(function(){h(b.lastX+1,b.lastY+1)}),e.addVisual())}}]}),e.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:k,onclick:q.tableProps}),e.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:k,cmd:"mceTableDelete"}),e.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:f("mceTableCellProps"),onPostRender:l},{text:"Merge cells",onclick:f("mceTableMergeCells"),onPostRender:l},{text:"Split cell",onclick:f("mceTableSplitCells"),onPostRender:l}]}),e.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:f("mceTableInsertRowBefore"),onPostRender:l},{text:"Insert row after",onclick:f("mceTableInsertRowAfter"),onPostRender:l},{text:"Delete row",onclick:f("mceTableDeleteRow"),onPostRender:l},{text:"Row properties",onclick:f("mceTableRowProps"),onPostRender:l},{text:"-"},{text:"Cut row",onclick:f("mceTableCutRow"),onPostRender:l},{text:"Copy row",onclick:f("mceTableCopyRow"),onPostRender:l},{text:"Paste row before",onclick:f("mceTablePasteRowBefore"),onPostRender:l},{text:"Paste row after",onclick:f("mceTablePasteRowAfter"),onPostRender:l}]}),e.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:f("mceTableInsertColBefore"),onPostRender:l},{text:"Insert column after",onclick:f("mceTableInsertColAfter"),onPostRender:l},{text:"Delete column",onclick:f("mceTableDeleteCol"),onPostRender:l}]});var r=[];j("inserttable tableprops deletetable | cell row column".split(" "),function(a){r.push("|"==a?{text:"-"}:e.menuItems[a])}),e.addButton("table",{type:"menubutton",title:"Table",menu:r}),g.isIE||e.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(e.selection.select(a),e.nodeChanged())}),p.quirks=new b(e),e.on("Init",function(){p.cellSelection=new c(e)}),e.on("PreInit",function(){e.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)})}),j({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=e.dom.getParent(e.selection.getStart(),"th,td"),e.dom.select("td.mce-item-selected,th.mce-item-selected").length?a.merge():q.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){o=a.cutRows()},mceTableCopyRow:function(a){o=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(o,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(o)},mceTableDelete:function(a){a.deleteTable()}},function(b,c){e.addCommand(c,function(){var c=new a(e);c&&(b(c),e.execCommand("mceRepaint"),p.cellSelection.clear())})}),j({mceInsertTable:q.table,mceTableProps:function(){q.table(!0)},mceTableRowProps:q.row,mceTableCellProps:q.cell},function(a,b){e.addCommand(b,function(b,c){a(c)})}),e.settings.table_tab_navigation!==!1&&e.on("keydown",function(b){var c,d,f;9==b.keyCode&&(c=e.dom.getParent(e.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(e),f=b.shiftKey?-1:1,e.undoManager.transact(function(){!d.moveRelIdx(c,f)&&f>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,f))})))}),p.insertTable=h}var j=e.each;h.add("table",i)})}(this);
mce/visualchars/plugin.js CHANGED
@@ -15,10 +15,45 @@ tinymce.PluginManager.add('visualchars', function(editor) {
15
 
16
  function toggleVisualChars(addBookmark) {
17
  var node, nodeList, i, body = editor.getBody(), nodeValue, selection = editor.selection, div, bookmark;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  state = !state;
20
  self.state = state;
21
  editor.fire('VisualChars', {state: state});
 
22
 
23
  if (addBookmark) {
24
  bookmark = selection.getBookmark();
@@ -27,14 +62,14 @@ tinymce.PluginManager.add('visualchars', function(editor) {
27
  if (state) {
28
  nodeList = [];
29
  tinymce.walk(body, function(n) {
30
- if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) {
31
  nodeList.push(n);
32
  }
33
  }, 'childNodes');
34
 
35
  for (i = 0; i < nodeList.length; i++) {
36
  nodeValue = nodeList[i].nodeValue;
37
- nodeValue = nodeValue.replace(/(\u00a0)/g, '<span data-mce-bogus="1" class="mce-nbsp">$1</span>');
38
 
39
  div = editor.dom.create('div', null, nodeValue);
40
  while ((node = div.lastChild)) {
@@ -44,7 +79,7 @@ tinymce.PluginManager.add('visualchars', function(editor) {
44
  editor.dom.remove(nodeList[i]);
45
  }
46
  } else {
47
- nodeList = editor.dom.select('span.mce-nbsp', body);
48
 
49
  for (i = nodeList.length - 1; i >= 0; i--) {
50
  editor.dom.remove(nodeList[i], 1);
15
 
16
  function toggleVisualChars(addBookmark) {
17
  var node, nodeList, i, body = editor.getBody(), nodeValue, selection = editor.selection, div, bookmark;
18
+ var charMap, visualCharsRegExp;
19
+
20
+ charMap = {
21
+ '\u00a0': 'nbsp',
22
+ '\u00ad': 'shy'
23
+ };
24
+
25
+ function wrapCharWithSpan(value) {
26
+ return '<span data-mce-bogus="1" class="mce-' + charMap[value] + '">' + value + '</span>';
27
+ }
28
+
29
+ function compileCharMapToRegExp() {
30
+ var key, regExp = '';
31
+
32
+ for (key in charMap) {
33
+ regExp += key;
34
+ }
35
+
36
+ return new RegExp('[' + regExp + ']', 'g');
37
+ }
38
+
39
+ function compileCharMapToCssSelector() {
40
+ var key, selector = '';
41
+
42
+ for (key in charMap) {
43
+ if (selector) {
44
+ selector += ',';
45
+ }
46
+
47
+ selector += 'span.mce-' + charMap[key];
48
+ }
49
+
50
+ return selector;
51
+ }
52
 
53
  state = !state;
54
  self.state = state;
55
  editor.fire('VisualChars', {state: state});
56
+ visualCharsRegExp = compileCharMapToRegExp();
57
 
58
  if (addBookmark) {
59
  bookmark = selection.getBookmark();
62
  if (state) {
63
  nodeList = [];
64
  tinymce.walk(body, function(n) {
65
+ if (n.nodeType == 3 && n.nodeValue && visualCharsRegExp.test(n.nodeValue)) {
66
  nodeList.push(n);
67
  }
68
  }, 'childNodes');
69
 
70
  for (i = 0; i < nodeList.length; i++) {
71
  nodeValue = nodeList[i].nodeValue;
72
+ nodeValue = nodeValue.replace(visualCharsRegExp, wrapCharWithSpan);
73
 
74
  div = editor.dom.create('div', null, nodeValue);
75
  while ((node = div.lastChild)) {
79
  editor.dom.remove(nodeList[i]);
80
  }
81
  } else {
82
+ nodeList = editor.dom.select(compileCharMapToCssSelector(), body);
83
 
84
  for (i = nodeList.length - 1; i >= 0; i--) {
85
  editor.dom.remove(nodeList[i], 1);
mce/visualchars/plugin.min.js CHANGED
@@ -1 +1 @@
1
- tinymce.PluginManager.add("visualchars",function(a){function b(b){var c,f,g,h,i,j,k=a.getBody(),l=a.selection;if(d=!d,e.state=d,a.fire("VisualChars",{state:d}),b&&(j=l.getBookmark()),d)for(f=[],tinymce.walk(k,function(a){3==a.nodeType&&a.nodeValue&&-1!=a.nodeValue.indexOf("\xa0")&&f.push(a)},"childNodes"),g=0;g<f.length;g++){for(h=f[g].nodeValue,h=h.replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mce-nbsp">$1</span>'),i=a.dom.create("div",null,h);c=i.lastChild;)a.dom.insertAfter(c,f[g]);a.dom.remove(f[g])}else for(f=a.dom.select("span.mce-nbsp",k),g=f.length-1;g>=0;g--)a.dom.remove(f[g],1);l.moveToBookmark(j)}function c(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})}var d,e=this;a.addCommand("mceVisualChars",b),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c,selectable:!0,context:"view",prependToContext:!0}),a.on("beforegetcontent",function(a){d&&"raw"!=a.format&&!a.draft&&(d=!0,b(!1))})});
1
+ tinymce.PluginManager.add("visualchars",function(a){function b(b){function c(a){return'<span data-mce-bogus="1" class="mce-'+n[a]+'">'+a+"</span>"}function f(){var a,b="";for(a in n)b+=a;return new RegExp("["+b+"]","g")}function g(){var a,b="";for(a in n)b&&(b+=","),b+="span.mce-"+n[a];return b}var h,i,j,k,l,m,n,o,p=a.getBody(),q=a.selection;if(n={"\xa0":"nbsp","\xad":"shy"},d=!d,e.state=d,a.fire("VisualChars",{state:d}),o=f(),b&&(m=q.getBookmark()),d)for(i=[],tinymce.walk(p,function(a){3==a.nodeType&&a.nodeValue&&o.test(a.nodeValue)&&i.push(a)},"childNodes"),j=0;j<i.length;j++){for(k=i[j].nodeValue,k=k.replace(o,c),l=a.dom.create("div",null,k);h=l.lastChild;)a.dom.insertAfter(h,i[j]);a.dom.remove(i[j])}else for(i=a.dom.select(g(),p),j=i.length-1;j>=0;j--)a.dom.remove(i[j],1);q.moveToBookmark(m)}function c(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})}var d,e=this;a.addCommand("mceVisualChars",b),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c,selectable:!0,context:"view",prependToContext:!0}),a.on("beforegetcontent",function(a){d&&"raw"!=a.format&&!a.draft&&(d=!0,b(!1))})});
mce/wptadv/plugin.js CHANGED
@@ -1,52 +1,68 @@
1
  /*global tinymce:true */
2
 
3
  tinymce.PluginManager.add( 'wptadv', function( editor ) {
4
- editor.on( 'init', function() {
5
- if ( ! editor.settings.wpautop && editor.settings.tadv_noautop ) {
6
- editor.on( 'SaveContent', function( event ) {
7
- var regex = [
8
- new RegExp('https?://(www\\.)?youtube\\.com/(watch|playlist).*', 'i'),
9
- new RegExp('https?://youtu.be/.*', 'i'),
10
- new RegExp('https?://blip.tv/.*', 'i'),
11
- new RegExp('https?://(www\\.)?vimeo\\.com/.*', 'i'),
12
- new RegExp('https?://(www\\.)?dailymotion\\.com/.*', 'i'),
13
- new RegExp('https?://dai.ly/.*', 'i'),
14
- new RegExp('https?://(www\\.)?flickr\\.com/.*', 'i'),
15
- new RegExp('https?://flic.kr/.*', 'i'),
16
- new RegExp('https?://(.+\\.)?smugmug\\.com/.*', 'i'),
17
- new RegExp('https?://(www\\.)?hulu\\.com/watch/.*', 'i'),
18
- new RegExp('https?://(www\\.)?viddler\\.com/.*', 'i'),
19
- new RegExp('https?://qik.com/.*', 'i'),
20
- new RegExp('https?://revision3.com/.*', 'i'),
21
- new RegExp('https?://i*.photobucket.com/albums/.*', 'i'),
22
- new RegExp('https?://gi*.photobucket.com/groups/.*', 'i'),
23
- new RegExp('https?://(www\\.)?scribd\\.com/.*', 'i'),
24
- new RegExp('https?://wordpress.tv/.*', 'i'),
25
- new RegExp('https?://(.+\\.)?polldaddy\\.com/.*', 'i'),
26
- new RegExp('https?://poll\\.fm/.*', 'i'),
27
- new RegExp('https?://(www\\.)?funnyordie\\.com/videos/.*', 'i'),
28
- new RegExp('https?://(www\\.)?twitter\\.com/.+?/status(es)?/.*', 'i'),
29
- new RegExp('https?://vine\\.co/v/.*', 'i'),
30
- new RegExp('https?://(www\\.)?soundcloud\\.com/.*', 'i'),
31
- new RegExp('https?://(www\\.)?slideshare\\.net/.*', 'i'),
32
- new RegExp('https?://instagr(\\.am|am\\.com)/p/.*', 'i'),
33
- new RegExp('https?://(www\\.)?rdio\\.com/.*', 'i'),
34
- new RegExp('https?://rd\\.io/x/.*', 'i'),
35
- new RegExp('https?://(open|play)\\.spotify\\.com/.*', 'i'),
36
- new RegExp('https?://(.+\\.)?imgur\\.com/.*', 'i'),
37
- new RegExp('https?://(www\\.)?meetu(\\.ps|p\\.com)/.*', 'i'),
38
- new RegExp('https?://(www\\.)?issuu\\.com/.+/docs/.*', 'i'),
39
- new RegExp('https?://(www\\.)?collegehumor\\.com/video/.*', 'i'),
40
- new RegExp('https?://(www\\.)?collegehumor\\.com/video/.*', 'i'),
41
- new RegExp('https?://(www\\.)?mixcloud\\.com/.*', 'i'),
42
- new RegExp('https?://(www\\.|embed\\.)?ted\\.com/talks/.*', 'i'),
43
- new RegExp('https?://(www\\.)(animoto|video214)\\.com/play/.*', 'i')
44
- ];
 
 
 
 
 
 
 
 
 
45
 
46
- event.content = event.content.replace( /<p>(https?:\/\/[^<> "]+?)<\/p>/ig, function( all, match ) {
 
 
 
 
 
 
47
  for( var i in regex ) {
48
  if ( regex[i].test( match ) ) {
49
  return '\n' + match + '\n';
 
50
  }
51
  }
52
  return all;
@@ -54,11 +70,23 @@ tinymce.PluginManager.add( 'wptadv', function( editor ) {
54
  .replace( /caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g, 'caption] [caption' )
55
  .replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) {
56
  return match.replace( /[\r\n]+/g, ' ' );
57
- }).replace( /<pre[^>]*>[\s\S]+?<\/pre>/g, function( match ) {
 
58
  match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
59
  return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
60
  });
 
 
 
 
 
61
  });
62
- }
63
- });
 
 
 
 
 
 
64
  });
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'),
8
+ new RegExp('https?://(www\\.)?vimeo\\.com/.*', 'i'),
9
+ new RegExp('https?://(www\\.)?dailymotion\\.com/.*', 'i'),
10
+ new RegExp('https?://dai.ly/.*', 'i'),
11
+ new RegExp('https?://(www\\.)?flickr\\.com/.*', 'i'),
12
+ new RegExp('https?://flic.kr/.*', 'i'),
13
+ new RegExp('https?://(.+\\.)?smugmug\\.com/.*', 'i'),
14
+ new RegExp('https?://(www\\.)?hulu\\.com/watch/.*', 'i'),
15
+ new RegExp('https?://(www\\.)?viddler\\.com/.*', 'i'),
16
+ new RegExp('https?://qik.com/.*', 'i'),
17
+ new RegExp('https?://revision3.com/.*', 'i'),
18
+ new RegExp('https?://i*.photobucket.com/albums/.*', 'i'),
19
+ new RegExp('https?://gi*.photobucket.com/groups/.*', 'i'),
20
+ new RegExp('https?://(www\\.)?scribd\\.com/.*', 'i'),
21
+ new RegExp('https?://wordpress.tv/.*', 'i'),
22
+ new RegExp('https?://(.+\\.)?polldaddy\\.com/.*', 'i'),
23
+ new RegExp('https?://poll\\.fm/.*', 'i'),
24
+ new RegExp('https?://(www\\.)?funnyordie\\.com/videos/.*', 'i'),
25
+ new RegExp('https?://(www\\.)?twitter\\.com/.+?/status(es)?/.*', 'i'),
26
+ new RegExp('https?://vine\\.co/v/.*', 'i'),
27
+ new RegExp('https?://(www\\.)?soundcloud\\.com/.*', 'i'),
28
+ new RegExp('https?://(www\\.)?slideshare\\.net/.*', 'i'),
29
+ new RegExp('https?://instagr(\\.am|am\\.com)/p/.*', 'i'),
30
+ new RegExp('https?://(www\\.)?rdio\\.com/.*', 'i'),
31
+ new RegExp('https?://rd\\.io/x/.*', 'i'),
32
+ new RegExp('https?://(open|play)\\.spotify\\.com/.*', 'i'),
33
+ new RegExp('https?://(.+\\.)?imgur\\.com/.*', 'i'),
34
+ new RegExp('https?://(www\\.)?meetu(\\.ps|p\\.com)/.*', 'i'),
35
+ new RegExp('https?://(www\\.)?issuu\\.com/.+/docs/.*', 'i'),
36
+ new RegExp('https?://(www\\.)?collegehumor\\.com/video/.*', 'i'),
37
+ new RegExp('https?://(www\\.)?mixcloud\\.com/.*', 'i'),
38
+ new RegExp('https?://(www\\.|embed\\.)?ted\\.com/talks/.*', 'i'),
39
+ new RegExp('https?://(www\\.)(animoto|video214)\\.com/play/.*', 'i'),
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
 
55
+ return trim( html );
56
+ }
57
+
58
+ if ( ! editor.settings.wpautop && editor.settings.tadv_noautop ) {
59
+ editor.on( 'init', function() {
60
+ editor.on( 'SaveContent', function( event ) {
61
+ event.content = event.content.replace( /<p>\s*(https?:\/\/[^<>"\s]+)\s*<\/p>/ig, function( all, match ) {
62
  for( var i in regex ) {
63
  if ( regex[i].test( match ) ) {
64
  return '\n' + match + '\n';
65
+ // return '<p>[embed]' + match + '[/embed]</p>';
66
  }
67
  }
68
  return all;
70
  .replace( /caption\](\s|<br[^>]*>|<p>&nbsp;<\/p>)*\[caption/g, 'caption] [caption' )
71
  .replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) {
72
  return match.replace( /[\r\n]+/g, ' ' );
73
+ })
74
+ .replace( /<pre[^>]*>[\s\S]+?<\/pre>/g, function( match ) {
75
  match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
76
  return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
77
  });
78
+ }); // end SaveContent
79
+
80
+ editor.on( 'hide', function() {
81
+ var textarea = editor.getElement();
82
+ textarea.value = addLineBreaks( textarea.value );
83
  });
84
+ });
85
+
86
+ editor.on( 'beforeSetContent', function( event ) {
87
+ if ( event.load ) {
88
+ event.content = event.content.replace( /(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/igm, '$1<p>$2</p>$3' );
89
+ }
90
+ }, true );
91
+ }
92
  });
mce/wptadv/plugin.min.js CHANGED
@@ -1 +1 @@
1
- tinymce.PluginManager.add("wptadv",function(a){a.on("init",function(){!a.settings.wpautop&&a.settings.tadv_noautop&&a.on("SaveContent",function(a){var b=[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\\.)?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")];a.content=a.content.replace(/<p>(https?:\/\/[^<> "]+?)<\/p>/gi,function(a,c){for(var d in b)if(b[d].test(c))return"\n"+c+"\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")})})})});
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<"),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){a.load&&(a.content=a.content.replace(/(^|[\r\n]+)\s*(https?:\/\/[^<>"\s]+)[ \u00A0\uFEFF]*([\r\n]+|$)/gim,"$1<p>$2</p>$3"))},!0))});
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === TinyMCE Advanced ===
2
  Contributors: azaozz
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
- Requires at least: 4.1
5
- Tested up to: 4.1
6
- Stable tag: 4.1.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -30,6 +30,11 @@ Best is to install directly from WordPress. If manual installation is required,
30
 
31
  == Changelog ==
32
 
 
 
 
 
 
33
  = 4.1.7 =
34
  * Updated for WordPress 4.1 and TinyMCE 4.1.7.
35
  * Fixed bug where consecutive caption shortcodes may be split with an empty paragraph tag.
1
  === TinyMCE Advanced ===
2
  Contributors: azaozz
3
  Tags: wysiwyg, formatting, tinymce, write, editor
4
+ Requires at least: 4.2
5
+ Tested up to: 4.2
6
+ Stable tag: 4.1.9
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
30
 
31
  == Changelog ==
32
 
33
+ = 4.1.9 =
34
+ * Updated for WordPress 4.2 and TinyMCE 4.1.9.
35
+ * Fixed bugs with showing oEmbed previews when pasting an URL.
36
+ * Fixed bugs with getting the content from TinyMCE with line breaks.
37
+
38
  = 4.1.7 =
39
  * Updated for WordPress 4.1 and TinyMCE 4.1.7.
40
  * Fixed bug where consecutive caption shortcodes may be split with an empty paragraph tag.
tadv_admin.php CHANGED
@@ -12,23 +12,6 @@ if ( ! current_user_can( 'manage_options' ) ) {
12
  load_plugin_textdomain( 'tinymce-advanced', false, 'tinymce-advanced/langs' );
13
  $message = '';
14
 
15
- // TODO admin || SA
16
- if ( ! $this->check_minimum_supported_version() ) {
17
- ?>
18
- <div class="wrap">
19
- <div class="error">
20
- <p><?php printf(
21
- __( 'This plugin requires WordPress version %1$s or newer. Please upgrade your WordPress installation or download an <a href="%2$s">older version of the plugin</a>.', 'tinymce-advanced' ),
22
- '4.0',
23
- '//wordpress.org/extend/plugins/tinymce-advanced/download/'
24
- ); ?></p>
25
- </div>
26
- </div>
27
- <?php
28
-
29
- return;
30
- }
31
-
32
  $imgpath = TADV_URL . 'images/';
33
  $tadv_options_updated = false;
34
  $settings = $admin_settings = array();
@@ -250,6 +233,9 @@ $all_buttons = $this->get_all_buttons();
250
  <h2><?php _e( 'Editor Settings', 'tinymce-advanced' ); ?></h2>
251
  <?php
252
 
 
 
 
253
  if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
254
  ?><div class="updated"><p><?php _e( 'Settings saved.', 'tinymce-advanced' ); ?></p></div><?php
255
  } else {
12
  load_plugin_textdomain( 'tinymce-advanced', false, 'tinymce-advanced/langs' );
13
  $message = '';
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  $imgpath = TADV_URL . 'images/';
16
  $tadv_options_updated = false;
17
  $settings = $admin_settings = array();
233
  <h2><?php _e( 'Editor Settings', 'tinymce-advanced' ); ?></h2>
234
  <?php
235
 
236
+ // TODO admin || SA
237
+ $this->warn_if_unsupported();
238
+
239
  if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
240
  ?><div class="updated"><p><?php _e( 'Settings saved.', 'tinymce-advanced' ); ?></p></div><?php
241
  } else {
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.1.7
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
 
@@ -19,6 +19,7 @@ if ( ! class_exists('Tinymce_Advanced') ) :
19
 
20
  class Tinymce_Advanced {
21
 
 
22
  private $settings;
23
  private $admin_settings;
24
  private $admin_options;
@@ -75,11 +76,6 @@ class Tinymce_Advanced {
75
  add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
76
  }
77
 
78
- // Don't load on non-supported WP versions
79
- if ( ! $this->check_minimum_supported_version() ) {
80
- return;
81
- }
82
-
83
  add_filter( 'mce_buttons', array( &$this, 'mce_buttons_1' ), 999, 2 );
84
  add_filter( 'mce_buttons_2', array( &$this, 'mce_buttons_2' ), 999 );
85
  add_filter( 'mce_buttons_3', array( &$this, 'mce_buttons_3' ), 999 );
@@ -90,6 +86,8 @@ class Tinymce_Advanced {
90
  add_filter( 'mce_external_plugins', array( &$this, 'mce_external_plugins' ), 999 );
91
  add_filter( 'tiny_mce_plugins', array( &$this, 'tiny_mce_plugins' ), 999 );
92
  add_action( 'after_wp_tiny_mce', array( &$this, 'after_wp_tiny_mce' ) );
 
 
93
  }
94
 
95
  // When using a plugin that changes the paths dinamically, set these earlier than 'plugins_loaded' 50.
@@ -101,33 +99,13 @@ class Tinymce_Advanced {
101
  define( 'TADV_PATH', plugin_dir_path( __FILE__ ) );
102
  }
103
 
104
- private function remove_settings( $all = false ) {
105
- if ( $all ) {
106
- delete_option( 'tadv_settings' );
107
- delete_option( 'tadv_admin_settings' );
108
- delete_option( 'tadv_version' );
109
- }
110
-
111
- // Delete old options
112
- delete_option('tadv_options');
113
- delete_option('tadv_toolbars');
114
- delete_option('tadv_plugins');
115
- delete_option('tadv_btns1');
116
- delete_option('tadv_btns2');
117
- delete_option('tadv_btns3');
118
- delete_option('tadv_btns4');
119
- delete_option('tadv_allbtns');
120
- }
121
-
122
  function enqueue_scripts( $page ) {
123
  if ( 'settings_page_tinymce-advanced' == $page ) {
124
  wp_enqueue_script( 'tadv-js', TADV_URL . 'js/tadv.js', array( 'jquery-ui-sortable' ), '4.0', true );
125
  wp_enqueue_style( 'tadv-mce-skin', includes_url( 'js/tinymce/skins/lightgray/skin.min.css' ), array(), '4.0' );
126
  wp_enqueue_style( 'tadv-css', TADV_URL . 'css/tadv-styles.css', array( 'editor-buttons' ), '4.0' );
127
 
128
- if ( substr( get_locale(), 0, 2 ) !== 'en' ) {
129
- add_action( 'admin_footer', array( &$this, 'load_mce_translation' ) );
130
- }
131
  }
132
  }
133
 
@@ -136,15 +114,9 @@ class Tinymce_Advanced {
136
  require( ABSPATH . WPINC . '/class-wp-editor.php' );
137
  }
138
 
139
- $strings = _WP_Editors::wp_mce_translation();
140
- $strings = preg_replace( '/tinymce.addI18n[^{]+/', '', $strings );
141
- $strings = preg_replace( '/[^}]*$/', '', $strings );
142
-
143
- if ( $strings ) {
144
- ?>
145
- <script type="text/javascript">var tadvTranslation = <?php echo $strings; ?>;</script>
146
- <?php
147
- }
148
  }
149
 
150
  function load_settings() {
@@ -177,9 +149,43 @@ class Tinymce_Advanced {
177
  $this->get_all_buttons();
178
  }
179
 
180
- // Min version 4.1-RC1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  private function check_minimum_supported_version() {
182
- return ( isset( $GLOBALS['wp_db_version'] ) && $GLOBALS['wp_db_version'] >= 30133 );
 
 
 
183
  }
184
 
185
  private function check_plugin_version() {
@@ -197,7 +203,14 @@ class Tinymce_Advanced {
197
 
198
  if ( $version < 4000 ) {
199
  // Upgrade to TinyMCE 4.0, clean options
200
- $this->remove_settings();
 
 
 
 
 
 
 
201
  }
202
  }
203
 
@@ -244,8 +257,9 @@ class Tinymce_Advanced {
244
  'anchor' => 'Anchor',
245
  'searchreplace' => 'Find and replace',
246
  'visualblocks' => 'Show blocks',
247
- // 'visualchars' => 'Hidden chars',
248
  'code' => 'Source code',
 
249
  'fullscreen' => 'Fullscreen',
250
  'insertdatetime' => 'Insert date/time',
251
  'media' => 'Insert/edit video',
@@ -409,7 +423,7 @@ class Tinymce_Advanced {
409
  function mce_options( $init ) {
410
  if ( $this->check_admin_setting( 'no_autop' ) ) {
411
  $init['wpautop'] = false;
412
- $init['indent'] = true;
413
  $init['tadv_noautop'] = true;
414
  }
415
 
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.1.9
7
  Author: Andrew Ozz
8
  Author URI: http://www.laptoptips.ca/
9
 
19
 
20
  class Tinymce_Advanced {
21
 
22
+ private $required_version = '4.2';
23
  private $settings;
24
  private $admin_settings;
25
  private $admin_options;
76
  add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_scripts' ) );
77
  }
78
 
 
 
 
 
 
79
  add_filter( 'mce_buttons', array( &$this, 'mce_buttons_1' ), 999, 2 );
80
  add_filter( 'mce_buttons_2', array( &$this, 'mce_buttons_2' ), 999 );
81
  add_filter( 'mce_buttons_3', array( &$this, 'mce_buttons_3' ), 999 );
86
  add_filter( 'mce_external_plugins', array( &$this, 'mce_external_plugins' ), 999 );
87
  add_filter( 'tiny_mce_plugins', array( &$this, 'tiny_mce_plugins' ), 999 );
88
  add_action( 'after_wp_tiny_mce', array( &$this, 'after_wp_tiny_mce' ) );
89
+
90
+ add_action( 'before_wp_tiny_mce', array( &$this, 'show_version_warning' ) );
91
  }
92
 
93
  // When using a plugin that changes the paths dinamically, set these earlier than 'plugins_loaded' 50.
99
  define( 'TADV_PATH', plugin_dir_path( __FILE__ ) );
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  function enqueue_scripts( $page ) {
103
  if ( 'settings_page_tinymce-advanced' == $page ) {
104
  wp_enqueue_script( 'tadv-js', TADV_URL . 'js/tadv.js', array( 'jquery-ui-sortable' ), '4.0', true );
105
  wp_enqueue_style( 'tadv-mce-skin', includes_url( 'js/tinymce/skins/lightgray/skin.min.css' ), array(), '4.0' );
106
  wp_enqueue_style( 'tadv-css', TADV_URL . 'css/tadv-styles.css', array( 'editor-buttons' ), '4.0' );
107
 
108
+ add_action( 'admin_footer', array( &$this, 'load_mce_translation' ) );
 
 
109
  }
110
  }
111
 
114
  require( ABSPATH . WPINC . '/class-wp-editor.php' );
115
  }
116
 
117
+ ?>
118
+ <script>var tadvTranslation = <?php echo _WP_Editors::wp_mce_translation( '', true ); ?>;</script>
119
+ <?php
 
 
 
 
 
 
120
  }
121
 
122
  function load_settings() {
149
  $this->get_all_buttons();
150
  }
151
 
152
+ public function show_version_warning() {
153
+ if ( is_admin() && current_user_can( 'update_plugins' ) && get_current_screen()->base === 'post' ) {
154
+ $this->warn_if_unsupported();
155
+ }
156
+ }
157
+
158
+ public function warn_if_unsupported() {
159
+ if ( ! $this->check_minimum_supported_version() ) {
160
+ $wp_ver = ! empty( $GLOBALS['wp_version'] ) ? $GLOBALS['wp_version'] : '(undefined)';
161
+
162
+ ?>
163
+ <div class="error"><p>
164
+ <?php
165
+
166
+ printf( __( 'TinyMCE Advanced requires WordPress version %1$s or newer. It appears that you are running %2$s. This can make the editor unstable.', 'tinymce-advanced' ),
167
+ $this->required_version,
168
+ esc_html( $wp_ver )
169
+ );
170
+
171
+ echo '<br>';
172
+
173
+ printf( __( 'Please upgrade your WordPress installation or download an <a href="%s">older version of the plugin</a>.', 'tinymce-advanced' ),
174
+ 'https://wordpress.org/plugins/tinymce-advanced/download/'
175
+ );
176
+
177
+ ?>
178
+ </p></div>
179
+ <?php
180
+ }
181
+ }
182
+
183
+ // Min version
184
  private function check_minimum_supported_version() {
185
+ $wp_version = isset( $GLOBALS['wp_version'] ) ? $GLOBALS['wp_version'] : '0';
186
+ $wp_version = str_replace( '-src', '', $wp_version );
187
+
188
+ return ( version_compare( $wp_version, $this->required_version, '>=' ) );
189
  }
190
 
191
  private function check_plugin_version() {
203
 
204
  if ( $version < 4000 ) {
205
  // Upgrade to TinyMCE 4.0, clean options
206
+ delete_option('tadv_options');
207
+ delete_option('tadv_toolbars');
208
+ delete_option('tadv_plugins');
209
+ delete_option('tadv_btns1');
210
+ delete_option('tadv_btns2');
211
+ delete_option('tadv_btns3');
212
+ delete_option('tadv_btns4');
213
+ delete_option('tadv_allbtns');
214
  }
215
  }
216
 
257
  'anchor' => 'Anchor',
258
  'searchreplace' => 'Find and replace',
259
  'visualblocks' => 'Show blocks',
260
+ 'visualchars' => 'Show invisible characters',
261
  'code' => 'Source code',
262
+ 'wp_code' => 'Code',
263
  'fullscreen' => 'Fullscreen',
264
  'insertdatetime' => 'Insert date/time',
265
  'media' => 'Insert/edit video',
423
  function mce_options( $init ) {
424
  if ( $this->check_admin_setting( 'no_autop' ) ) {
425
  $init['wpautop'] = false;
426
+ // $init['indent'] = true;
427
  $init['tadv_noautop'] = true;
428
  }
429