Version Description
- Updated for WordPress 4.1 and TinyMCE 4.1.7.
- Fixed bug where consecutive caption shortcodes may be split with an empty paragraph tag.
Download this release
Release Info
Developer | azaozz |
Plugin | TinyMCE Advanced |
Version | 4.1.7 |
Comparing to | |
See all releases |
Code changes from version 4.1.1 to 4.1.7
- langs/tinymce-advanced.pot +101 -65
- mce/advlist/plugin.js +18 -16
- mce/advlist/plugin.min.js +1 -1
- mce/anchor/plugin.min.js +1 -1
- mce/code/plugin.min.js +1 -1
- mce/contextmenu/plugin.min.js +1 -1
- mce/importcss/plugin.min.js +1 -1
- mce/insertdatetime/plugin.min.js +1 -1
- mce/link/plugin.min.js +1 -1
- mce/nonbreaking/plugin.min.js +1 -1
- mce/print/plugin.min.js +1 -1
- mce/searchreplace/plugin.min.js +1 -1
- mce/table/plugin.min.js +1 -1
- mce/textpattern/plugin.min.js +1 -1
- mce/visualblocks/plugin.min.js +1 -1
- mce/visualchars/plugin.min.js +1 -1
- mce/wptadv/plugin.js +24 -21
- mce/wptadv/plugin.min.js +1 -1
- readme.txt +6 -2
- tadv_admin.php +64 -103
- tinymce-advanced.php +10 -9
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-
|
5 |
-
"PO-Revision-Date: 2014-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: en_US\n"
|
@@ -21,202 +21,238 @@ msgstr ""
|
|
21 |
#: ../tadv_admin.php:21
|
22 |
#, php-format
|
23 |
msgid ""
|
24 |
-
"This plugin requires WordPress version
|
25 |
-
"WordPress installation or download an %
|
|
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: ../tadv_admin.php:
|
29 |
msgid "Default settings restored."
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: ../tadv_admin.php:
|
33 |
msgid "TinyMCE Advanced Settings Export"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: ../tadv_admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
msgid ""
|
38 |
-
"
|
39 |
-
"
|
40 |
-
"Notepad. It is important that the export is not changed in any way, no "
|
41 |
-
"spaces, line breaks, etc."
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: ../tadv_admin.php:
|
45 |
msgid "Select All"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: ../tadv_admin.php:
|
49 |
msgid "Back to Editor Settings"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: ../tadv_admin.php:
|
53 |
msgid "TinyMCE Advanced Settings Import"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: ../tadv_admin.php:
|
57 |
msgid ""
|
58 |
"The settings are imported from a JSON encoded string. Please paste the "
|
59 |
-
"exported string in the
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: ../tadv_admin.php:
|
63 |
msgid "Verify"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: ../tadv_admin.php:
|
67 |
msgid "Import"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: ../tadv_admin.php:
|
71 |
msgid "Importing of settings failed."
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: ../tadv_admin.php:
|
75 |
msgid "ERROR: All toolbars are empty. Default settings loaded."
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: ../tadv_admin.php:
|
79 |
msgid "Editor Settings"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: ../tadv_admin.php:
|
83 |
msgid "Settings saved."
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: ../tadv_admin.php:
|
87 |
msgid "Save Changes"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: ../tadv_admin.php:
|
91 |
msgid ""
|
92 |
"New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, "
|
93 |
"most buttons are also available as menu items."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: ../tadv_admin.php:
|
97 |
msgid "Enable the editor menu."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: ../tadv_admin.php:
|
101 |
msgid ""
|
102 |
"Drag buttons from the unused buttons below and drop them in the toolbars "
|
103 |
"above, or drag the buttons in the toolbars to rearrange them."
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: ../tadv_admin.php:
|
107 |
msgid "Unused Buttons"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: ../tadv_admin.php:
|
111 |
msgid "Also enable:"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: ../tadv_admin.php:
|
115 |
msgid "List Style Options"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: ../tadv_admin.php:
|
119 |
msgid "Context Menu"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: ../tadv_admin.php:
|
123 |
msgid "Link (replaces the Insert/Edit Link dialog)"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: ../tadv_admin.php:
|
127 |
msgid "Advanced Options"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: ../tadv_admin.php:
|
131 |
msgid "Import editor-style.css."
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: ../tadv_admin.php:
|
|
|
|
|
|
|
|
|
135 |
msgid ""
|
136 |
-
"
|
137 |
-
"
|
138 |
-
|
|
|
|
|
|
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: ../tadv_admin.php:
|
142 |
msgid ""
|
143 |
"Load the CSS classes used in editor-style.css and replace the Formats button "
|
144 |
"and sub-menu."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: ../tadv_admin.php:
|
148 |
msgid "Markdown typing support (text pattern plugin)"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: ../tadv_admin.php:
|
152 |
msgid ""
|
153 |
"This plugin matches special patterns while you type and applies formats or "
|
154 |
-
"
|
155 |
-
"as the markdown syntax so you can type <code># text</code> to create a "
|
156 |
-
"header, <code>1. text</code> to create a list, <code>**text**</code> to make "
|
157 |
-
"something bold, etc."
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: ../tadv_admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
msgid "More information"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: ../tadv_admin.php:
|
165 |
msgid ""
|
166 |
"Stop removing the <p> and <br /> tags when saving and show them "
|
167 |
"in the Text editor"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: ../tadv_admin.php:
|
171 |
msgid ""
|
172 |
"This will make it possible to use more advanced coding in the HTML editor "
|
173 |
-
"without the back-end filtering affecting it much.
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: ../tadv_admin.php:
|
181 |
msgid "Replace font size settings"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: ../tadv_admin.php:
|
185 |
msgid ""
|
186 |
"Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px "
|
187 |
"20px 24px 28px 32px 36px."
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: ../tadv_admin.php:
|
191 |
msgid "Enable pasting of image source"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: ../tadv_admin.php:
|
195 |
msgid ""
|
196 |
"Works only in Firefox and Safari. These browsers support pasting of images "
|
197 |
-
"directly in the editor and convert them to base64 encoded text.
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: ../tadv_admin.php:
|
204 |
msgid "Administration"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: ../tadv_admin.php:
|
208 |
msgid "Export Settings"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: ../tadv_admin.php:
|
212 |
msgid "Import Settings"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: ../tadv_admin.php:
|
216 |
msgid "Restore Default Settings"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: ../tadv_admin.php:
|
220 |
msgid ""
|
221 |
"The [Toolbar toggle] button shows or hides the second, third, and forth "
|
222 |
"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: 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"
|
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 <p> and <br /> 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 <br /"
|
206 |
+
"> 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 "
|
mce/advlist/plugin.js
CHANGED
@@ -36,27 +36,29 @@ tinymce.PluginManager.add('advlist', function(editor) {
|
|
36 |
ulMenuItems = buildMenuItems('UL', editor.getParam("advlist_bullet_styles", "default,circle,disc,square"));
|
37 |
|
38 |
function applyListFormat(listName, styleValue) {
|
39 |
-
|
|
|
40 |
|
41 |
-
|
42 |
-
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
-
|
|
|
60 |
}
|
61 |
|
62 |
function updateSelection(e) {
|
36 |
ulMenuItems = buildMenuItems('UL', editor.getParam("advlist_bullet_styles", "default,circle,disc,square"));
|
37 |
|
38 |
function applyListFormat(listName, styleValue) {
|
39 |
+
editor.undoManager.transact(function() {
|
40 |
+
var list, dom = editor.dom, sel = editor.selection;
|
41 |
|
42 |
+
// Check for existing list element
|
43 |
+
list = dom.getParent(sel.getNode(), 'ol,ul');
|
44 |
|
45 |
+
// Switch/add list type if needed
|
46 |
+
if (!list || list.nodeName != listName || styleValue === false) {
|
47 |
+
editor.execCommand(listName == 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList');
|
48 |
+
}
|
49 |
|
50 |
+
// Set style
|
51 |
+
styleValue = styleValue === false ? lastStyles[listName] : styleValue;
|
52 |
+
lastStyles[listName] = styleValue;
|
53 |
|
54 |
+
list = dom.getParent(sel.getNode(), 'ol,ul');
|
55 |
+
if (list) {
|
56 |
+
dom.setStyle(list, 'listStyleType', styleValue ? styleValue : null);
|
57 |
+
list.removeAttribute('data-mce-style');
|
58 |
+
}
|
59 |
|
60 |
+
editor.focus();
|
61 |
+
});
|
62 |
}
|
63 |
|
64 |
function updateSelection(e) {
|
mce/advlist/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("advlist",function(
|
1 |
+
tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;d=e.getParent(f.getNode(),"ol,ul"),d&&d.nodeName==b&&c!==!1||a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList"),c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})});
|
mce/anchor/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("anchor",function(
|
1 |
+
tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="";"A"==b.tagName&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(b){a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:b.data.name}))}})}a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})});
|
mce/code/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("code",function(
|
1 |
+
tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})});
|
mce/contextmenu/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("contextmenu",function(
|
1 |
+
tinymce.PluginManager.add("contextmenu",function(a){var b,c=a.settings.contextmenu_never_use_native;a.on("contextmenu",function(d){var e,f=a.getDoc();if(!d.ctrlKey||c){if(d.preventDefault(),tinymce.Env.mac&&tinymce.Env.webkit&&2==d.button&&f.caretRangeFromPoint&&a.selection.setRng(f.caretRangeFromPoint(d.x,d.y)),e=a.settings.contextmenu||"link image inserttable | cell row column deletetable",b)b.show();else{var g=[];tinymce.each(e.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",g.push(c))});for(var h=0;h<g.length;h++)"|"==g[h].text&&(0===h||h==g.length-1)&&g.splice(h,1);b=new tinymce.ui.Menu({items:g,context:"contextmenu"}).addClass("contextmenu").renderTo(),a.on("remove",function(){b.remove(),b=null})}var i={x:d.pageX,y:d.pageY};a.inline||(i=tinymce.DOM.getPos(a.getContentAreaContainer()),i.x+=d.clientX,i.y+=d.clientY),b.moveTo(i.x,i.y)}})});
|
mce/importcss/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("importcss",function(
|
1 |
+
tinymce.PluginManager.add("importcss",function(a){function b(a){return"string"==typeof a?function(b){return-1!==b.indexOf(a)}:a instanceof RegExp?function(b){return a.test(b)}:a}function c(b,c){function d(a,b){var g,h=a.href;if(h&&c(h,b)){f(a.imports,function(a){d(a,!0)});try{g=a.cssRules||a.rules}catch(i){}f(g,function(a){a.styleSheet?d(a.styleSheet,!0):a.selectorText&&f(a.selectorText.split(","),function(a){e.push(tinymce.trim(a))})})}}var e=[],g={};f(a.contentCSS,function(a){g[a]=!0}),c||(c=function(a,b){return b||g[a]});try{f(b.styleSheets,function(a){d(a)})}catch(h){}return e}function d(b){var c,d=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b);if(d){var e=d[1],f=d[2].substr(1).split(".").join(" "),g=tinymce.makeMap("a,img");return d[1]?(c={title:b},a.schema.getTextBlockElements()[e]?c.block=e:a.schema.getBlockElements()[e]||g[e.toLowerCase()]?c.selector=e:c.inline=e):d[2]&&(c={inline:"span",title:b.substr(1),classes:f}),a.settings.importcss_merge_classes!==!1?c.classes=f:c.attributes={"class":f},c}}var e=this,f=tinymce.each;a.on("renderFormatsMenu",function(g){var h=a.settings,i={},j=h.importcss_selector_converter||d,k=b(h.importcss_selector_filter),l=g.control;a.settings.importcss_append||l.items().remove();var m=[];tinymce.each(h.importcss_groups,function(a){a=tinymce.extend({},a),a.filter=b(a.filter),m.push(a)}),f(c(g.doc||a.getDoc(),b(h.importcss_file_filter)),function(b){if(-1===b.indexOf(".mce-")&&!i[b]&&(!k||k(b))){var c,d=j.call(e,b);if(d){var f=d.name||tinymce.DOM.uniqueId();if(m)for(var g=0;g<m.length;g++)if(!m[g].filter||m[g].filter(b)){m[g].item||(m[g].item={text:m[g].title,menu:[]}),c=m[g].item.menu;break}a.formatter.register(f,d);var h=tinymce.extend({},l.settings.itemDefaults,{text:d.title,format:f});c?c.push(h):l.add(h)}i[b]=!0}}),f(m,function(a){l.add(a.item)}),g.control.renderNew()}),e.convertSelectorToFormat=d});
|
mce/insertdatetime/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("insertdatetime",function(
|
1 |
+
tinymce.PluginManager.add("insertdatetime",function(a){function b(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(i[c.getMonth()])),b=b.replace("%b",""+a.translate(h[c.getMonth()])),b=b.replace("%A",""+a.translate(g[c.getDay()])),b=b.replace("%a",""+a.translate(f[c.getDay()])),b=b.replace("%%","%")}function c(c){var d=b(c);if(a.settings.insertdatetime_element){var e;e=b(/%[HMSIp]/.test(c)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),d='<time datetime="'+e+'">'+d+"</time>";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var d,e,f="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),h="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" "),j=[];a.addCommand("mceInsertDate",function(){c(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){c(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){c(d||e)},menu:j}),tinymce.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){e||(e=a),j.push({text:b(a),onclick:function(){d=a,c(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:j,context:"insert"})});
|
mce/link/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("link",function(
|
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})});
|
mce/nonbreaking/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("nonbreaking",function(
|
1 |
+
tinymce.PluginManager.add("nonbreaking",function(a){var b=a.getParam("nonbreaking_force_tab");if(a.addCommand("mceNonBreaking",function(){a.insertContent(a.plugins.visualchars&&a.plugins.visualchars.state?'<span class="mce-nbsp"> </span>':" "),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;c>d;d++)a.execCommand("mceNonBreaking")}})}});
|
mce/print/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("print",function(
|
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"})});
|
mce/searchreplace/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){function
|
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)}();
|
mce/table/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;r<n.length;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;l<a.length-1;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/tableplugin/TableGrid",c="tinymce/util/Tools",u="tinymce/Env",d="tinymce/tableplugin/Quirks",f="tinymce/util/VK",p="tinymce/tableplugin/CellSelection",m="tinymce/dom/TreeWalker",h="tinymce/tableplugin/Dialogs",g="tinymce/tableplugin/Plugin",v="tinymce/PluginManager";r(l,[c,u],function(e,n){function r(e,t){return parseInt(e.getAttribute(t)||1,10)}var i=e.each;return function(o,a){function s(){var e=0;B=[],D=0,i(["thead","tbody","tfoot"],function(t){var n=O.select("> "+t+" tr",a);i(n,function(n,o){o+=e,i(O.select("> td, > th",n),function(e,n){var i,a,s,l;if(B[o])for(;B[o][n];)n++;for(s=r(e,"rowspan"),l=r(e,"colspan"),a=o;o+s>a;a++)for(B[a]||(B[a]=[]),i=n;n+l>i;i++)B[a][i]={part:t,real:a==o&&i==n,elm:e,rowspan:s,colspan:l};D=Math.max(D,n+1)})}),e+=n.length})}function l(e,t){return e=e.cloneNode(t),e.removeAttribute("id"),e}function c(e,t){var n;return n=B[t],n?n[e]:void 0}function u(e,t,n){e&&(n=parseInt(n,10),1===n?e.removeAttribute(t,1):e.setAttribute(t,n,1))}function d(e){return e&&(O.hasClass(e.elm,"mce-item-selected")||e==H)}function f(){var e=[];return i(a.rows,function(t){i(t.cells,function(n){return O.hasClass(n,"mce-item-selected")||H&&n==H.elm?(e.push(t),!1):void 0})}),e}function p(){var e=O.createRng();e.setStartAfter(a),e.setEndAfter(a),L.setRng(e),O.remove(a)}function m(t){var r,a={};return o.settings.table_clone_elements!==!1&&(a=e.makeMap((o.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),e.walk(t,function(e){var o;return 3==e.nodeType?(i(O.getParents(e.parentNode,null,t).reverse(),function(e){a[e.nodeName]&&(e=l(e,!1),r?o&&o.appendChild(e):r=o=e,o=e)}),o&&(o.innerHTML=n.ie?" ":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),t=l(t,!1),u(t,"rowSpan",1),u(t,"colSpan",1),r?t.appendChild(r):(!n.ie||n.ie>10)&&(t.innerHTML='<br data-mce-bogus="1" />'),t}function h(){var e=O.createRng(),t;return i(O.select("tr",a),function(e){0===e.cells.length&&O.remove(e)}),0===O.select("tr",a).length?(e.setStartBefore(a),e.setEndBefore(a),L.setRng(e),void O.remove(a)):(i(O.select("thead,tbody,tfoot",a),function(e){0===e.rows.length&&O.remove(e)}),s(),void(P&&(t=B[Math.min(B.length-1,P.y)],t&&(L.select(t[Math.min(t.length-1,P.x)].elm,!0),L.collapse(!0)))))}function g(e,t,n,r){var i,o,a,s,l;for(i=B[t][e].elm.parentNode,a=1;n>=a;a++)if(i=O.getNext(i,"tr")){for(o=e;o>=0;o--)if(l=B[t+a][o].elm,l.parentNode==i){for(s=1;r>=s;s++)O.insertAfter(m(l),l);break}if(-1==o)for(s=1;r>=s;s++)i.insertBefore(m(i.cells[0]),i.cells[0])}}function v(){i(B,function(e,t){i(e,function(e,n){var i,o,a;if(d(e)&&(e=e.elm,i=r(e,"colspan"),o=r(e,"rowspan"),i>1||o>1)){for(u(e,"rowSpan",1),u(e,"colSpan",1),a=0;i-1>a;a++)O.insertAfter(m(e),e);g(n,t,o-1,i)}})})}function y(t,n,r){var o,a,l,f,p,m,g,y,b,C,x;if(t?(o=k(t),a=o.x,l=o.y,f=a+(n-1),p=l+(r-1)):(P=M=null,i(B,function(e,t){i(e,function(e,n){d(e)&&(P||(P={x:n,y:t}),M={x:n,y:t})})}),P&&(a=P.x,l=P.y,f=M.x,p=M.y)),y=c(a,l),b=c(f,p),y&&b&&y.part==b.part){for(v(),s(),y=c(a,l).elm,u(y,"colSpan",f-a+1),u(y,"rowSpan",p-l+1),g=l;p>=g;g++)for(m=a;f>=m;m++)B[g]&&B[g][m]&&(t=B[g][m].elm,t!=y&&(C=e.grep(t.childNodes),i(C,function(e){y.appendChild(e)}),C.length&&(C=e.grep(y.childNodes),x=0,i(C,function(e){"BR"==e.nodeName&&O.getAttrib(e,"data-mce-bogus")&&x++<C.length-1&&y.removeChild(e)})),O.remove(t)));h()}}function b(e){var n,o,a,s,c,f,p,h,g;if(i(B,function(t,r){return i(t,function(t){return d(t)&&(t=t.elm,c=t.parentNode,f=l(c,!1),n=r,e)?!1:void 0}),e?!n:void 0}),n!==t){for(s=0;s<B[0].length;s++)if(B[n][s]&&(o=B[n][s].elm,o!=a)){if(e){if(n>0&&B[n-1][s]&&(h=B[n-1][s].elm,g=r(h,"rowSpan"),g>1)){u(h,"rowSpan",g+1);continue}}else if(g=r(o,"rowspan"),g>1){u(o,"rowSpan",g+1);continue}p=m(o),u(p,"colSpan",o.colSpan),f.appendChild(p),a=o}f.hasChildNodes()&&(e?c.parentNode.insertBefore(f,c):O.insertAfter(f,c))}}function C(e){var t,n;i(B,function(n){return i(n,function(n,r){return d(n)&&(t=r,e)?!1:void 0}),e?!t:void 0}),i(B,function(i,o){var a,s,l;i[t]&&(a=i[t].elm,a!=n&&(l=r(a,"colspan"),s=r(a,"rowspan"),1==l?e?(a.parentNode.insertBefore(m(a),a),g(t,o,s-1,l)):(O.insertAfter(m(a),a),g(t,o,s-1,l)):u(a,"colSpan",a.colSpan+1),n=a))})}function x(){var t=[];i(B,function(n){i(n,function(n,o){d(n)&&-1===e.inArray(t,o)&&(i(B,function(e){var t=e[o].elm,n;n=r(t,"colSpan"),n>1?u(t,"colSpan",n-1):O.remove(t)}),t.push(o))})}),h()}function w(){function e(e){var t,n;i(e.cells,function(e){var n=r(e,"rowSpan");n>1&&(u(e,"rowSpan",n-1),t=k(e),g(t.x,t.y,1,1))}),t=k(e.cells[0]),i(B[t.y],function(e){var t;e=e.elm,e!=n&&(t=r(e,"rowSpan"),1>=t?O.remove(e):u(e,"rowSpan",t-1),n=e)})}var t;t=f(),i(t.reverse(),function(t){e(t)}),h()}function _(){var e=f();return O.remove(e),h(),e}function E(){var e=f();return i(e,function(t,n){e[n]=l(t,!0)}),e}function N(e,t){var n=f(),r=n[t?0:n.length-1],o=r.cells.length;e&&(i(B,function(e){var t;return o=0,i(e,function(e){e.real&&(o+=e.colspan),e.elm.parentNode==r&&(t=1)}),t?!1:void 0}),t||e.reverse(),i(e,function(e){var n,i=e.cells.length,a;for(n=0;i>n;n++)a=e.cells[n],u(a,"colSpan",1),u(a,"rowSpan",1);for(n=i;o>n;n++)e.appendChild(m(e.cells[i-1]));for(n=o;i>n;n++)O.remove(e.cells[n]);t?r.parentNode.insertBefore(e,r):O.insertAfter(e,r)}),O.removeClass(O.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function k(e){var t;return i(B,function(n,r){return i(n,function(n,i){return n.elm==e?(t={x:i,y:r},!1):void 0}),!t}),t}function S(e){P=k(e)}function T(){var e,t;return e=t=0,i(B,function(n,r){i(n,function(n,i){var o,a;d(n)&&(n=B[r][i],i>e&&(e=i),r>t&&(t=r),n.real&&(o=n.colspan-1,a=n.rowspan-1,o&&i+o>e&&(e=i+o),a&&r+a>t&&(t=r+a)))})}),{x:e,y:t}}function R(e){var t,n,r,i,o,a,s,l,c,u;if(M=k(e),P&&M){for(t=Math.min(P.x,M.x),n=Math.min(P.y,M.y),r=Math.max(P.x,M.x),i=Math.max(P.y,M.y),o=r,a=i,u=n;a>=u;u++)e=B[u][t],e.real||t-(e.colspan-1)<t&&(t-=e.colspan-1);for(c=t;o>=c;c++)e=B[n][c],e.real||n-(e.rowspan-1)<n&&(n-=e.rowspan-1);for(u=n;i>=u;u++)for(c=t;r>=c;c++)e=B[u][c],e.real&&(s=e.colspan-1,l=e.rowspan-1,s&&c+s>o&&(o=c+s),l&&u+l>a&&(a=u+l));for(O.removeClass(O.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),u=n;a>=u;u++)for(c=t;o>=c;c++)B[u][c]&&O.addClass(B[u][c].elm,"mce-item-selected")}}function A(e,t){var n,r,i;n=k(e),r=n.y*D+n.x;do{if(r+=t,i=c(r%D,Math.floor(r/D)),!i)break;if(i.elm!=e)return L.select(i.elm,!0),O.isEmpty(i.elm)&&L.collapse(!0),!0}while(i.elm==e);return!1}var B,D,P,M,H,L=o.selection,O=L.dom;a=a||O.getParent(L.getStart(),"table"),s(),H=O.getParent(L.getStart(),"th,td"),H&&(P=k(H),M=T(),H=c(P.x,P.y)),e.extend(this,{deleteTable:p,split:v,merge:y,insertRow:b,insertCol:C,deleteCols:x,deleteRows:w,cutRows:_,copyRows:E,pasteRows:N,getPos:k,setStartCell:S,setEndCell:R,moveRelIdx:A,refresh:s})}}),r(d,[f,u,c],function(e,t,n){function r(e,t){return parseInt(e.getAttribute(t)||1,10)}var i=n.each;return function(n){function o(){function t(t){function o(e,r){var i=e?"previousSibling":"nextSibling",o=n.dom.getParent(r,"tr"),s=o[i];if(s)return g(n,r,s,e),t.preventDefault(),!0;var u=n.dom.getParent(o,"table"),d=o.parentNode,f=d.nodeName.toLowerCase();if("tbody"===f||f===(e?"tfoot":"thead")){var p=a(e,u,d,"tbody");if(null!==p)return l(e,p,r)}return c(e,o,i,u)}function a(e,t,r,i){var o=n.dom.select(">"+i,t),a=o.indexOf(r);if(e&&0===a||!e&&a===o.length-1)return s(e,t);if(-1===a){var l="thead"===r.tagName.toLowerCase()?0:o.length-1;return o[l]}return o[a+(e?-1:1)]}function s(e,t){var r=e?"thead":"tfoot",i=n.dom.select(">"+r,t);return 0!==i.length?i[0]:null}function l(e,r,i){var o=u(r,e);return o&&g(n,i,o,e),t.preventDefault(),!0}function c(e,r,i,a){var s=a[i];if(s)return d(s),!0;var l=n.dom.getParent(a,"td,th");if(l)return o(e,l,t);var c=u(r,!e);return d(c),t.preventDefault(),!1}function u(e,t){var r=e&&e[t?"lastChild":"firstChild"];return r&&"BR"===r.nodeName?n.dom.getParent(r,"td,th"):r}function d(e){n.selection.setCursorLocation(e,0)}function f(){return b==e.UP||b==e.DOWN}function p(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"tr");return null!==n}function m(e){for(var t=0,n=e;n.previousSibling;)n=n.previousSibling,t+=r(n,"colspan");return t}function h(e,t){var n=0,o=0;return i(e.children,function(e,i){return n+=r(e,"colspan"),o=i,n>t?!1:void 0}),o}function g(e,t,r,i){var o=m(n.dom.getParent(t,"td,th")),a=h(r,o),s=r.childNodes[a],l=u(s,i);d(l||s)}function v(e){var t=n.selection.getNode(),r=n.dom.getParent(t,"td,th"),i=n.dom.getParent(e,"td,th");return r&&r!==i&&y(r,i)}function y(e,t){return n.dom.getParent(e,"TABLE")===n.dom.getParent(t,"TABLE")}var b=t.keyCode;if(f()&&p(n)){var C=n.selection.getNode();setTimeout(function(){v(C)&&o(!t.shiftKey&&b===e.UP,C,t)},0)}}n.on("KeyDown",function(e){t(e)})}function a(){function e(e,t){var n=t.ownerDocument,r=n.createRange(),i;return r.setStartBefore(t),r.setEnd(e.endContainer,e.endOffset),i=n.createElement("body"),i.appendChild(r.cloneContents()),0===i.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}n.on("KeyDown",function(t){var r,i,o=n.dom;(37==t.keyCode||38==t.keyCode)&&(r=n.selection.getRng(),i=o.getParent(r.startContainer,"table"),i&&n.getBody().firstChild==i&&e(r,i)&&(r=o.createRng(),r.setStartBefore(i),r.setEndBefore(i),n.selection.setRng(r),t.preventDefault()))})}function s(){n.on("KeyDown SetContent VisualAid",function(){var e;for(e=n.getBody().lastChild;e;e=e.previousSibling)if(3==e.nodeType){if(e.nodeValue.length>0)break}else if(1==e.nodeType&&("BR"==e.tagName||!e.getAttribute("data-mce-bogus")))break;e&&"TABLE"==e.nodeName&&(n.settings.forced_root_block?n.dom.add(n.getBody(),n.settings.forced_root_block,n.settings.forced_root_block_attrs,t.ie&&t.ie<11?" ":'<br data-mce-bogus="1" />'):n.dom.add(n.getBody(),"br",{"data-mce-bogus":"1"}))}),n.on("PreProcess",function(e){var t=e.node.lastChild;t&&("BR"==t.nodeName||1==t.childNodes.length&&("BR"==t.firstChild.nodeName||"\xa0"==t.firstChild.nodeValue))&&t.previousSibling&&"TABLE"==t.previousSibling.nodeName&&n.dom.remove(t)})}function l(){function e(e,t,n,r){var i=3,o=e.dom.getParent(t.startContainer,"TABLE"),a,s,l;return o&&(a=o.parentNode),s=t.startContainer.nodeType==i&&0===t.startOffset&&0===t.endOffset&&r&&("TR"==n.nodeName||n==a),l=("TD"==n.nodeName||"TH"==n.nodeName)&&!r,s||l}function t(){var t=n.selection.getRng(),r=n.selection.getNode(),i=n.dom.getParent(t.startContainer,"TD,TH");if(e(n,t,r,i)){i||(i=r);for(var o=i.lastChild;o.lastChild;)o=o.lastChild;3==o.nodeType&&(t.setEnd(o,o.data.length),n.selection.setRng(t))}}n.on("KeyDown",function(){t()}),n.on("MouseDown",function(e){2!=e.button&&t()})}function c(){n.on("keydown",function(t){if((t.keyCode==e.DELETE||t.keyCode==e.BACKSPACE)&&!t.isDefaultPrevented()){var r=n.dom.getParent(n.selection.getStart(),"table");if(r){for(var i=n.dom.select("td,th",r),o=i.length;o--;)if(!n.dom.hasClass(i[o],"mce-item-selected"))return;t.preventDefault(),n.execCommand("mceTableDelete")}}})}c(),t.webkit&&(o(),l()),t.gecko&&(a(),s()),t.ie>10&&(a(),s())}}),r(p,[l,m,c],function(e,t,n){return function(r){function i(e){r.getBody().style.webkitUserSelect="",(e||u)&&(r.dom.removeClass(r.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),u=!1)}function o(t){var n,i,o=t.target;if(!d&&l&&(s||o!=l)&&("TD"==o.nodeName||"TH"==o.nodeName)){i=a.getParent(o,"table"),i==c&&(s||(s=new e(r,i),s.setStartCell(l),r.getBody().style.webkitUserSelect="none"),s.setEndCell(o),u=!0),n=r.selection.getSel();try{n.removeAllRanges?n.removeAllRanges():n.empty()}catch(f){}t.preventDefault()}}var a=r.dom,s,l,c,u=!0,d;return r.on("MouseDown",function(e){2==e.button||d||(i(),l=a.getParent(e.target,"td,th"),c=a.getParent(l,"table"))}),r.on("mouseover",o),r.on("remove",function(){a.unbind(r.getDoc(),"mouseover",o)}),r.on("MouseUp",function(){function e(e,r){var o=new t(e,e);do{if(3==e.nodeType&&0!==n.trim(e.nodeValue).length)return void(r?i.setStart(e,0):i.setEnd(e,e.nodeValue.length));if("BR"==e.nodeName)return void(r?i.setStartBefore(e):i.setEndBefore(e))}while(e=r?o.next():o.prev())}var i,o=r.selection,u,d,f,p;if(l){if(s&&(r.getBody().style.webkitUserSelect=""),u=a.select("td.mce-item-selected,th.mce-item-selected"),u.length>0){i=a.createRng(),f=u[0],i.setStartBefore(f),i.setEndAfter(f),e(f,1),d=new t(f,a.getParent(u[0],"table"));do if("TD"==f.nodeName||"TH"==f.nodeName){if(!a.hasClass(f,"mce-item-selected"))break;p=f}while(f=d.next());e(p),o.setRng(i)}r.nodeChanged(),l=s=c=null}}),r.on("KeyUp Drop SetContent",function(e){i("setcontent"==e.type),l=s=c=null,d=!1}),r.on("ObjectResizeStart ObjectResized",function(e){d="objectresized"!=e.type}),{clear:i}}}),r(h,[c,u],function(e,t){var n=e.each;return function(r){function i(){var e=r.settings.color_picker_callback;return e?function(){var t=this;e.call(r,function(e){t.value(e).fire("change")},t.value())}:void 0}function o(e){return{title:"Advanced",type:"form",defaults:{onchange:function(){d(e,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:i()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:i()}]}]}}function a(e){return e?e.replace(/px$/,""):""}function s(e){return/^[0-9]+$/.test(e)&&(e+="px"),e}function l(e){n("left center right".split(" "),function(t){r.formatter.remove("align"+t,{},e)})}function c(e){n("top middle bottom".split(" "),function(t){r.formatter.remove("valign"+t,{},e)})}function u(t,n,r){function i(t,r){return r=r||[],e.each(t,function(e){var t={text:e.text||e.title};e.menu?t.menu=i(e.menu):(t.value=e.value,n&&n(t)),r.push(t)}),r}return i(t,r||[])}function d(e,t,n){var r=t.toJSON(),i=e.parseStyle(r.style);n?(t.find("#borderColor").value(i["border-color"]||"")[0].fire("change"),t.find("#backgroundColor").value(i["background-color"]||"")[0].fire("change")):(i["border-color"]=r.borderColor,i["background-color"]=r.backgroundColor),t.find("#style").value(e.serializeStyle(e.parseStyle(e.serializeStyle(i))))}function f(e,t,n){var r=e.parseStyle(e.getAttrib(n,"style"));r["border-color"]&&(t.borderColor=r["border-color"]),r["background-color"]&&(t.backgroundColor=r["background-color"]),t.style=e.serializeStyle(r)}var p=this;p.tableProps=function(){p.table(!0)},p.table=function(i){function c(){var n;d(p,this),y=e.extend(y,this.toJSON()),e.each("backgroundColor borderColor".split(" "),function(e){delete y[e]}),y["class"]===!1&&delete y["class"],r.undoManager.transact(function(){m||(m=r.plugins.table.insertTable(y.cols||1,y.rows||1)),r.dom.setAttribs(m,{cellspacing:y.cellspacing,cellpadding:y.cellpadding,border:y.border,style:y.style,"class":y["class"]}),p.getAttrib(m,"width")?p.setAttrib(m,"width",a(y.width)):p.setStyle(m,"width",s(y.width)),p.setStyle(m,"height",s(y.height)),n=p.select("caption",m)[0],n&&!y.caption&&p.remove(n),!n&&y.caption&&(n=p.create("caption"),n.innerHTML=t.ie?"\xa0":'<br data-mce-bogus="1"/>',m.insertBefore(n,m.firstChild)),l(m),y.align&&r.formatter.apply("align"+y.align,{},m),r.focus(),r.addVisual()})}var p=r.dom,m,h,g,v,y={},b;i===!0?(m=p.getParent(r.selection.getStart(),"table"),m&&(y={width:a(p.getStyle(m,"width")||p.getAttrib(m,"width")),height:a(p.getStyle(m,"height")||p.getAttrib(m,"height")),cellspacing:m?p.getAttrib(m,"cellspacing"):"",cellpadding:m?p.getAttrib(m,"cellpadding"):"",border:m?p.getAttrib(m,"border"):"",caption:!!p.select("caption",m)[0],"class":p.getAttrib(m,"class")},n("left center right".split(" "),function(e){r.formatter.matchNode(m,"align"+e)&&(y.align=e)}))):(h={label:"Cols",name:"cols"},g={label:"Rows",name:"rows"}),r.settings.table_class_list&&(y["class"]&&(y["class"]=y["class"].replace(/\s*mce\-item\-table\s*/g,"")),v={name:"class",type:"listbox",label:"Class",values:u(r.settings.table_class_list,function(e){e.value&&(e.textStyle=function(){return r.formatter.getCssText({block:"table",classes:[e.value]})})})}),b={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:[h,g,{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"}]},v]},r.settings.table_advtab!==!1?(f(p,y,m),r.windowManager.open({title:"Table properties",data:y,bodyType:"tabpanel",body:[{title:"General",type:"form",items:b},o(p)],onsubmit:c})):r.windowManager.open({title:"Table properties",data:y,body:b,onsubmit:c})},p.merge=function(e,t){r.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 n=this.toJSON();r.undoManager.transact(function(){e.merge(t,n.cols,n.rows)})}})},p.cell=function(){function t(){d(i,this),m=e.extend(m,this.toJSON()),r.undoManager.transact(function(){n(g,function(e){r.dom.setAttribs(e,{scope:m.scope,style:m.style,"class":m["class"]}),r.dom.setStyles(e,{width:s(m.width),height:s(m.height)}),m.type&&e.nodeName.toLowerCase()!=m.type&&(e=i.rename(e,m.type)),l(e),m.align&&r.formatter.apply("align"+m.align,{},e),c(e),m.valign&&r.formatter.apply("valign"+m.valign,{},e)}),r.focus()})}var i=r.dom,p,m,h,g=[];if(g=r.dom.select("td.mce-item-selected,th.mce-item-selected"),p=r.dom.getParent(r.selection.getStart(),"td,th"),!g.length&&p&&g.push(p),p=p||g[0]){m={width:a(i.getStyle(p,"width")||i.getAttrib(p,"width")),height:a(i.getStyle(p,"height")||i.getAttrib(p,"height")),scope:i.getAttrib(p,"scope"),"class":i.getAttrib(p,"class")},m.type=p.nodeName.toLowerCase(),n("left center right".split(" "),function(e){r.formatter.matchNode(p,"align"+e)&&(m.align=e)}),n("top middle bottom".split(" "),function(e){r.formatter.matchNode(p,"valign"+e)&&(m.valign=e)}),r.settings.table_cell_class_list&&(h={name:"class",type:"listbox",label:"Class",values:u(r.settings.table_cell_class_list,function(e){e.value&&(e.textStyle=function(){return r.formatter.getCssText({block:"td",classes:[e.value]})})})});var v={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"}]}]},h]};r.settings.table_cell_advtab!==!1?(f(i,m,p),r.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:m,body:[{title:"General",type:"form",items:v},o(i)],onsubmit:t})):r.windowManager.open({title:"Cell properties",data:m,body:v,onsubmit:t})}},p.row=function(){function t(){var t,o,a;d(i,this),g=e.extend(g,this.toJSON()),r.undoManager.transact(function(){var e=g.type;n(v,function(n){r.dom.setAttribs(n,{scope:g.scope,style:g.style,"class":g["class"]}),r.dom.setStyles(n,{height:s(g.height)}),e!=n.parentNode.nodeName.toLowerCase()&&(t=i.getParent(n,"table"),o=n.parentNode,a=i.select(e,t)[0],a||(a=i.create(e),t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a)),a.appendChild(n),o.hasChildNodes()||i.remove(o)),l(n),g.align&&r.formatter.apply("align"+g.align,{},n)}),r.focus()})}var i=r.dom,c,p,m,h,g,v=[],y;c=r.dom.getParent(r.selection.getStart(),"table"),p=r.dom.getParent(r.selection.getStart(),"td,th"),n(c.rows,function(e){n(e.cells,function(t){return i.hasClass(t,"mce-item-selected")||t==p?(v.push(e),!1):void 0})}),m=v[0],m&&(g={height:a(i.getStyle(m,"height")||i.getAttrib(m,"height")),scope:i.getAttrib(m,"scope"),"class":i.getAttrib(m,"class")},g.type=m.parentNode.nodeName.toLowerCase(),n("left center right".split(" "),function(e){r.formatter.matchNode(m,"align"+e)&&(g.align=e)}),r.settings.table_row_class_list&&(h={name:"class",type:"listbox",label:"Class",values:u(r.settings.table_row_class_list,function(e){e.value&&(e.textStyle=function(){return r.formatter.getCssText({block:"tr",classes:[e.value]})})})}),y={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"},h]},r.settings.table_row_advtab!==!1?(f(i,g,m),r.windowManager.open({title:"Row properties",data:g,bodyType:"tabpanel",body:[{title:"General",type:"form",items:y},o(i)],onsubmit:t})):r.windowManager.open({title:"Row properties",data:g,body:y,onsubmit:t}))}}}),r(g,[l,d,p,h,c,m,u,v],function(e,t,n,r,i,o,a,s){function l(i){function o(e){return function(){i.execCommand(e)}}function s(e,t){var n,r,o,s;for(o='<table id="__mce"><tbody>',n=0;t>n;n++){for(o+="<tr>",r=0;e>r;r++)o+="<td>"+(a.ie?" ":"<br>")+"</td>";o+="</tr>"}return o+="</tbody></table>",i.undoManager.transact(function(){i.insertContent(o),s=i.dom.get("__mce"),i.dom.setAttrib(s,"id",null),i.dom.setAttribs(s,i.settings.table_default_attributes||{}),i.dom.setStyles(s,i.settings.table_default_styles||{})}),s}function l(e,t){function n(){e.disabled(!i.dom.getParent(i.selection.getStart(),t)),i.selection.selectorChanged(t,function(t){e.disabled(!t)})}i.initialized?n():i.on("init",n)}function u(){l(this,"table")}function d(){l(this,"td,th")}function f(){var e="";e='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var t=0;10>t;t++){e+="<tr>";for(var n=0;10>n;n++)e+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*t+n)+'" href="#" data-mce-x="'+n+'" data-mce-y="'+t+'"></a></td>';e+="</tr>"}return e+="</table>",e+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function p(e,t,n){var r=n.getEl().getElementsByTagName("table")[0],o,a,s,l,c,u=n.isRtl()||"tl-tr"==n.parent().rel;for(r.nextSibling.innerHTML=e+1+" x "+(t+1),u&&(e=9-e),a=0;10>a;a++)for(o=0;10>o;o++)l=r.rows[a].childNodes[o].firstChild,c=(u?o>=e:e>=o)&&t>=a,i.dom.toggleClass(l,"mce-active",c),c&&(s=l);return s.parentNode}var m,h=this,g=new r(i);i.settings.table_grid===!1?i.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:g.table}):i.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(e){e.aria&&(this.parent().hideAll(),e.stopImmediatePropagation(),g.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var e=this.menu.items()[0].getEl().getElementsByTagName("a");i.dom.removeClass(e,"mce-active"),i.dom.addClass(e[0],"mce-active")},menu:[{type:"container",html:f(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t=e.target,n,r;"A"==t.tagName.toUpperCase()&&(n=parseInt(t.getAttribute("data-mce-x"),10),r=parseInt(t.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(n=9-n),(n!==this.lastX||r!==this.lastY)&&(p(n,r,e.control),this.lastX=n,this.lastY=r))},onclick:function(e){var t=this;"A"==e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),t.parent().cancel(),i.undoManager.transact(function(){s(t.lastX+1,t.lastY+1)}),i.addVisual())}}]}),i.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:u,onclick:g.tableProps}),i.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:u,cmd:"mceTableDelete"}),i.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:o("mceTableCellProps"),onPostRender:d},{text:"Merge cells",onclick:o("mceTableMergeCells"),onPostRender:d},{text:"Split cell",onclick:o("mceTableSplitCells"),onPostRender:d}]}),i.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:o("mceTableInsertRowBefore"),onPostRender:d},{text:"Insert row after",onclick:o("mceTableInsertRowAfter"),onPostRender:d},{text:"Delete row",onclick:o("mceTableDeleteRow"),onPostRender:d},{text:"Row properties",onclick:o("mceTableRowProps"),onPostRender:d},{text:"-"},{text:"Cut row",onclick:o("mceTableCutRow"),onPostRender:d},{text:"Copy row",onclick:o("mceTableCopyRow"),onPostRender:d},{text:"Paste row before",onclick:o("mceTablePasteRowBefore"),onPostRender:d},{text:"Paste row after",onclick:o("mceTablePasteRowAfter"),onPostRender:d}]}),i.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:o("mceTableInsertColBefore"),onPostRender:d},{text:"Insert column after",onclick:o("mceTableInsertColAfter"),onPostRender:d},{text:"Delete column",onclick:o("mceTableDeleteCol"),onPostRender:d}]});var v=[];c("inserttable tableprops deletetable | cell row column".split(" "),function(e){v.push("|"==e?{text:"-"}:i.menuItems[e])}),i.addButton("table",{type:"menubutton",title:"Table",menu:v}),a.isIE||i.on("click",function(e){e=e.target,"TABLE"===e.nodeName&&(i.selection.select(e),i.nodeChanged())}),h.quirks=new t(i),i.on("Init",function(){h.cellSelection=new n(i)}),c({mceTableSplitCells:function(e){e.split()},mceTableMergeCells:function(e){var t;t=i.dom.getParent(i.selection.getStart(),"th,td"),i.dom.select("td.mce-item-selected,th.mce-item-selected").length?e.merge():g.merge(e,t)},mceTableInsertRowBefore:function(e){e.insertRow(!0)},mceTableInsertRowAfter:function(e){e.insertRow()},mceTableInsertColBefore:function(e){e.insertCol(!0)},mceTableInsertColAfter:function(e){e.insertCol()},mceTableDeleteCol:function(e){e.deleteCols()},mceTableDeleteRow:function(e){e.deleteRows()},mceTableCutRow:function(e){m=e.cutRows()},mceTableCopyRow:function(e){m=e.copyRows()},mceTablePasteRowBefore:function(e){e.pasteRows(m,!0)},mceTablePasteRowAfter:function(e){e.pasteRows(m)},mceTableDelete:function(e){e.deleteTable()}},function(t,n){i.addCommand(n,function(){var n=new e(i);n&&(t(n),i.execCommand("mceRepaint"),h.cellSelection.clear())})}),c({mceInsertTable:g.table,mceTableProps:function(){g.table(!0)},mceTableRowProps:g.row,mceTableCellProps:g.cell},function(e,t){i.addCommand(t,function(t,n){e(n)})}),i.settings.table_tab_navigation!==!1&&i.on("keydown",function(t){var n,r,o;9==t.keyCode&&(n=i.dom.getParent(i.selection.getStart(),"th,td"),n&&(t.preventDefault(),r=new e(i),o=t.shiftKey?-1:1,i.undoManager.transact(function(){!r.moveRelIdx(n,o)&&o>0&&(r.insertRow(),r.refresh(),r.moveRelIdx(n,o))})))}),h.insertTable=s}var c=i.each;s.add("table",l)}),a([])}(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?" ":'<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?" ":'<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);
|
mce/textpattern/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("textpattern",function(
|
1 |
+
tinymce.PluginManager.add("textpattern",function(a){function b(){return j&&(i.sort(function(a,b){return a.start.length>b.start.length?-1:a.start.length<b.start.length?1:0}),j=!1),i}function c(a){for(var c=b(),d=0;d<c.length;d++)if(0===a.indexOf(c[d].start)&&(!c[d].end||a.lastIndexOf(c[d].end)==a.length-c[d].end.length))return c[d]}function d(a,c,d){var e,f,g;for(e=b(),g=0;g<e.length;g++)if(f=e[g],f.end&&a.substr(c-f.end.length-d,f.end.length)==f.end)return f}function e(b){function e(){i=i.splitText(k),i.splitText(j-k-o),i.deleteData(0,n.start.length),i.deleteData(i.data.length-n.end.length,n.end.length)}var f,g,h,i,j,k,l,m,n,o,p;return f=a.selection,g=a.dom,f.isCollapsed()&&(h=f.getRng(!0),i=h.startContainer,j=h.startOffset,l=i.data,o=b?1:0,3==i.nodeType&&(n=d(l,j,o),n&&(k=Math.max(0,j-o),k=l.lastIndexOf(n.start,k-n.end.length-1),-1!==k&&(m=g.createRng(),m.setStart(i,k),m.setEnd(i,j-o),n=c(m.toString()),n&&n.end&&!(i.data.length<=n.start.length+n.end.length)))))?(p=a.formatter.get(n.format),p&&p[0].inline?(e(),a.formatter.apply(n.format,{},i),i):void 0):void 0}function f(){var b,d,e,f,g,h,i,j,k,l,m;if(b=a.selection,d=a.dom,b.isCollapsed()&&(i=d.getParent(b.getStart(),"p"))){for(k=new tinymce.dom.TreeWalker(i,i);g=k.next();)if(3==g.nodeType){f=g;break}if(f){if(j=c(f.data),!j)return;if(l=b.getRng(!0),e=l.startContainer,m=l.startOffset,f==e&&(m=Math.max(0,m-j.start.length)),tinymce.trim(f.data).length==j.start.length)return;j.format&&(h=a.formatter.get(j.format),h&&h[0].block&&(f.deleteData(0,j.start.length),a.formatter.apply(j.format,{},f),l.setStart(e,m),l.collapse(!0),b.setRng(l))),j.cmd&&a.undoManager.transact(function(){f.deleteData(0,j.start.length),a.execCommand(j.cmd)})}}}function g(){var b,c;c=e(),c&&(b=a.dom.createRng(),b.setStart(c,c.data.length),b.setEnd(c,c.data.length),a.selection.setRng(b)),f()}function h(){var b,c,d,f,g;b=e(!0),b&&(g=a.dom,c=b.data.slice(-1),/[\u00a0 ]/.test(c)&&(b.deleteData(b.data.length-1,1),d=g.doc.createTextNode(c),b.nextSibling?g.insertAfter(d,b.nextSibling):b.parentNode.appendChild(d),f=g.createRng(),f.setStart(d,1),f.setEnd(d,1),a.selection.setRng(f)))}var i,j=!0;i=a.settings.textpattern_patterns||[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],a.on("keydown",function(a){13!=a.keyCode||tinymce.util.VK.modifierPressed(a)||g()},!0),a.on("keyup",function(a){32!=a.keyCode||tinymce.util.VK.modifierPressed(a)||h()}),this.getPatterns=b,this.setPatterns=function(a){i=a,j=!0}});
|
mce/visualblocks/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("visualblocks",function(
|
1 |
+
tinymce.PluginManager.add("visualblocks",function(a,b){function c(){var b=this;b.active(f),a.on("VisualBlocks",function(){b.active(a.dom.hasClass(a.getBody(),"mce-visualblocks"))})}var d,e,f;window.NodeList&&(a.addCommand("mceVisualBlocks",function(){var c,g=a.dom;d||(d=g.uniqueId(),c=g.create("link",{id:d,rel:"stylesheet",href:b+"/css/visualblocks.css"}),a.getDoc().getElementsByTagName("head")[0].appendChild(c)),a.on("PreviewFormats AfterPreviewFormats",function(b){f&&g.toggleClass(a.getBody(),"mce-visualblocks","afterpreviewformats"==b.type)}),g.toggleClass(a.getBody(),"mce-visualblocks"),f=a.dom.hasClass(a.getBody(),"mce-visualblocks"),e&&e.active(g.hasClass(a.getBody(),"mce-visualblocks")),a.fire("VisualBlocks")}),a.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:c}),a.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:c,selectable:!0,context:"view",prependToContext:!0}),a.on("init",function(){a.settings.visualblocks_default_state&&a.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),a.on("remove",function(){a.dom.removeClass(a.getBody(),"mce-visualblocks")}))});
|
mce/visualchars/plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
tinymce.PluginManager.add("visualchars",function(
|
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))})});
|
mce/wptadv/plugin.js
CHANGED
@@ -5,32 +5,42 @@ tinymce.PluginManager.add( 'wptadv', function( editor ) {
|
|
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.*', 'i'),
|
9 |
-
new RegExp('
|
10 |
-
new RegExp('
|
11 |
new RegExp('https?://(www\\.)?vimeo\\.com/.*', 'i'),
|
12 |
new RegExp('https?://(www\\.)?dailymotion\\.com/.*', 'i'),
|
13 |
-
new RegExp('
|
14 |
new RegExp('https?://(www\\.)?flickr\\.com/.*', 'i'),
|
15 |
-
new RegExp('
|
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('
|
20 |
-
new RegExp('
|
21 |
-
new RegExp('
|
22 |
-
new RegExp('
|
23 |
new RegExp('https?://(www\\.)?scribd\\.com/.*', 'i'),
|
24 |
-
new RegExp('
|
25 |
new RegExp('https?://(.+\\.)?polldaddy\\.com/.*', 'i'),
|
|
|
26 |
new RegExp('https?://(www\\.)?funnyordie\\.com/videos/.*', 'i'),
|
27 |
new RegExp('https?://(www\\.)?twitter\\.com/.+?/status(es)?/.*', 'i'),
|
|
|
28 |
new RegExp('https?://(www\\.)?soundcloud\\.com/.*', 'i'),
|
29 |
-
new RegExp('https?://(www\\.)?slideshare\\.net
|
30 |
-
new RegExp('
|
31 |
new RegExp('https?://(www\\.)?rdio\\.com/.*', 'i'),
|
32 |
new RegExp('https?://rd\\.io/x/.*', 'i'),
|
33 |
-
new RegExp('https?://(open|play)\\.spotify\\.com/.*', 'i')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
];
|
35 |
|
36 |
event.content = event.content.replace( /<p>(https?:\/\/[^<> "]+?)<\/p>/ig, function( all, match ) {
|
@@ -41,7 +51,7 @@ tinymce.PluginManager.add( 'wptadv', function( editor ) {
|
|
41 |
}
|
42 |
return all;
|
43 |
})
|
44 |
-
.replace( /caption\]\[caption/g, 'caption] [caption' )
|
45 |
.replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) {
|
46 |
return match.replace( /[\r\n]+/g, ' ' );
|
47 |
}).replace( /<pre[^>]*>[\s\S]+?<\/pre>/g, function( match ) {
|
@@ -51,11 +61,4 @@ tinymce.PluginManager.add( 'wptadv', function( editor ) {
|
|
51 |
});
|
52 |
}
|
53 |
});
|
54 |
-
|
55 |
-
// Remove white space between <div> and <dl> (fixes captions when no wpautop)
|
56 |
-
editor.on( 'PostProcess', function( event ) {
|
57 |
-
if ( event.content && ! editor.settings.wpautop && editor.settings.tadv_noautop ) {
|
58 |
-
event.content = event.content.replace( /(<div [^>]+>)\s*<dl/g, '$1<dl' );
|
59 |
-
}
|
60 |
-
}, true );
|
61 |
});
|
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 ) {
|
51 |
}
|
52 |
return all;
|
53 |
})
|
54 |
+
.replace( /caption\](\s|<br[^>]*>|<p> <\/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 ) {
|
61 |
});
|
62 |
}
|
63 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
});
|
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.*","i"),new RegExp("
|
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> <\/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")})})})});
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== TinyMCE Advanced ===
|
2 |
Contributors: azaozz
|
3 |
Tags: wysiwyg, formatting, tinymce, write, editor
|
4 |
-
Requires at least: 4.
|
5 |
-
Tested up to: 4.
|
6 |
Stable tag: 4.1.1
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -30,6 +30,10 @@ Best is to install directly from WordPress. If manual installation is required,
|
|
30 |
|
31 |
== Changelog ==
|
32 |
|
|
|
|
|
|
|
|
|
33 |
= 4.1.1 =
|
34 |
* Fix bug with image captions when wpautop is disabled.
|
35 |
* Add translation support to the settings page. Button names/descriptions are translated from JS using the existing WordPress translation, so this part of the settings page will be translated by default. The other text still needs separate translation.
|
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
|
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.
|
36 |
+
|
37 |
= 4.1.1 =
|
38 |
* Fix bug with image captions when wpautop is disabled.
|
39 |
* Add translation support to the settings page. Button names/descriptions are translated from JS using the existing WordPress translation, so this part of the settings page will be translated by default. The other text still needs separate translation.
|
tadv_admin.php
CHANGED
@@ -18,10 +18,9 @@ if ( ! $this->check_minimum_supported_version() ) {
|
|
18 |
<div class="wrap">
|
19 |
<div class="error">
|
20 |
<p><?php printf(
|
21 |
-
__( 'This plugin requires WordPress version
|
22 |
-
|
23 |
-
'
|
24 |
-
'</a>'
|
25 |
); ?></p>
|
26 |
</div>
|
27 |
</div>
|
@@ -152,24 +151,20 @@ if ( isset( $_POST['tadv-save'] ) ) {
|
|
152 |
|
153 |
?>
|
154 |
<div class="wrap">
|
155 |
-
<h2><?php _e('TinyMCE Advanced Settings Export', 'tinymce-advanced'); ?></h2>
|
156 |
|
157 |
<div class="tadv-import-export">
|
158 |
<p>
|
159 |
-
<?php
|
160 |
-
|
161 |
-
_e( '
|
162 |
-
'and save it in a <b>text</b> (.txt) file, using a plain text editor like Notepad. ' .
|
163 |
-
'It is important that the export is not changed in any way, no spaces, line breaks, etc.', 'tinymce-advanced' );
|
164 |
-
|
165 |
-
?>
|
166 |
</p>
|
167 |
|
168 |
<form action="">
|
169 |
<p><textarea readonly="readonly" id="tadv-export"><?php echo json_encode( $output ); ?></textarea></p>
|
170 |
<p><button type="button" class="button" id="tadv-export-select"><?php _e( 'Select All', 'tinymce-advanced' ); ?></button></p>
|
171 |
</form>
|
172 |
-
<p><a href=""><?php _e('Back to Editor Settings', 'tinymce-advanced'); ?></a></p>
|
173 |
</div>
|
174 |
</div>
|
175 |
<?php
|
@@ -179,25 +174,21 @@ if ( isset( $_POST['tadv-save'] ) ) {
|
|
179 |
// TODO ! admin && ! SA
|
180 |
?>
|
181 |
<div class="wrap">
|
182 |
-
<h2><?php _e('TinyMCE Advanced Settings Import', 'tinymce-advanced'); ?></h2>
|
183 |
|
184 |
<div class="tadv-import-export">
|
185 |
-
<p><?php
|
186 |
-
_e( 'The settings are imported from a JSON encoded string. Please paste ' .
|
187 |
-
'the exported string in the textarea below.', 'tinymce-advanced' );
|
188 |
-
?></p>
|
189 |
|
190 |
<form action="" method="post">
|
191 |
<p><textarea id="tadv-import" name="tadv-import"></textarea></p>
|
192 |
<p>
|
193 |
<button type="button" class="button" id="tadv-import-verify"><?php _e( 'Verify', 'tinymce-advanced' ); ?></button>
|
194 |
-
<input type="submit" class="button button-primary alignright" name="tadv-import-submit" value="<?php
|
195 |
-
_e( 'Import', 'tinymce-advanced' ); ?>" />
|
196 |
</p>
|
197 |
<?php wp_nonce_field('tadv-import'); ?>
|
198 |
<p id="tadv-import-error"></p>
|
199 |
</form>
|
200 |
-
<p><a href=""><?php _e('Back to Editor Settings', 'tinymce-advanced'); ?></a></p>
|
201 |
</div>
|
202 |
</div>
|
203 |
<?php
|
@@ -244,9 +235,7 @@ if ( isset( $_POST['tadv-save'] ) ) {
|
|
244 |
$this->load_settings();
|
245 |
|
246 |
if ( empty( $this->toolbar_1 ) && empty( $this->toolbar_2 ) && empty( $this->toolbar_3 ) && empty( $this->toolbar_4 ) ) {
|
247 |
-
$message = '<div class="error"><p>' .
|
248 |
-
__('ERROR: All toolbars are empty. Default settings loaded.', 'tinymce-advanced') .
|
249 |
-
'</p></div>';
|
250 |
|
251 |
$this->admin_settings = $this->default_admin_settings;
|
252 |
$this->settings = $this->default_settings;
|
@@ -258,11 +247,11 @@ $all_buttons = $this->get_all_buttons();
|
|
258 |
|
259 |
?>
|
260 |
<div class="wrap" id="contain">
|
261 |
-
<h2><?php _e('Editor Settings', 'tinymce-advanced'); ?></h2>
|
262 |
<?php
|
263 |
|
264 |
if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
|
265 |
-
?><div class="updated"
|
266 |
} else {
|
267 |
echo $message;
|
268 |
}
|
@@ -271,17 +260,16 @@ if ( isset( $_POST['tadv-save'] ) && empty( $message ) ) {
|
|
271 |
<form id="tadvadmin" method="post" action="">
|
272 |
|
273 |
<p class="tadv-submit">
|
274 |
-
<input class="button-primary button-large" type="submit" name="tadv-save" value="<?php _e('Save Changes', 'tinymce-advanced'); ?>" />
|
275 |
</p>
|
276 |
|
277 |
<div id="tadvzones">
|
278 |
|
279 |
-
<p><?php _e( 'New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, '
|
280 |
-
'most buttons are also available as menu items.', 'tinymce-advanced' ); ?></p>
|
281 |
|
282 |
<p><label>
|
283 |
<input type="checkbox" name="menubar" id="menubar" <?php if ( $this->check_setting( 'menubar' ) ) { echo ' checked="checked"'; } ?>>
|
284 |
-
<?php _e('Enable the editor menu.', 'tinymce-advanced'); ?>
|
285 |
</label></p>
|
286 |
|
287 |
<div id="tadv-mce-menu" class="mce-container mce-menubar mce-toolbar mce-first mce-stack-layout-item
|
@@ -393,11 +381,10 @@ for ( $i = 1; $i < 5; $i++ ) {
|
|
393 |
?>
|
394 |
</div>
|
395 |
|
396 |
-
<p><?php _e('Drag buttons from the unused buttons below and drop them in the toolbars above, '
|
397 |
-
'or drag the buttons in the toolbars to rearrange them.', 'tinymce-advanced'); ?></p>
|
398 |
|
399 |
<div id="unuseddiv">
|
400 |
-
<h3><?php _e('Unused Buttons', 'tinymce-advanced'); ?></h3>
|
401 |
<ul id="unused" class="container">
|
402 |
<?php
|
403 |
|
@@ -438,21 +425,20 @@ foreach( $all_buttons as $button => $name ) {
|
|
438 |
</ul>
|
439 |
</div>
|
440 |
|
441 |
-
<p class="tadv-more-plugins"><?php _e( 'Also enable:' ); ?>
|
442 |
<label>
|
443 |
<input type="checkbox" name="advlist" id="advlist" <?php if ( $this->check_setting('advlist') ) echo ' checked="checked"'; ?> />
|
444 |
-
<?php _e('List Style Options', 'tinymce-advanced'); ?>
|
445 |
</label>
|
446 |
|
447 |
<label>
|
448 |
-
<input type="checkbox" name="contextmenu" id="contextmenu" <?php
|
449 |
-
|
450 |
-
<?php _e('Context Menu', 'tinymce-advanced'); ?>
|
451 |
</label>
|
452 |
|
453 |
<label>
|
454 |
<input type="checkbox" name="advlink" id="advlink" <?php if ( $this->check_setting('advlink') ) echo ' checked="checked"'; ?> />
|
455 |
-
<?php _e('Link (replaces the Insert/Edit Link dialog)', 'tinymce-advanced'); ?>
|
456 |
</label>
|
457 |
</p>
|
458 |
|
@@ -462,94 +448,72 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
|
|
462 |
|
463 |
?>
|
464 |
<div class="advanced-options">
|
465 |
-
<h3><?php _e('Advanced Options', 'tinymce-advanced'); ?></h3>
|
466 |
<?php
|
467 |
|
468 |
if ( ! is_multisite() && ! current_theme_supports( 'editor-style' ) ) {
|
469 |
|
470 |
?>
|
471 |
<div>
|
472 |
-
<label><input type="checkbox" name="editorstyle" id="editorstyle" <?php
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
_e( '
|
477 |
-
|
478 |
-
|
479 |
-
?></p>
|
480 |
</div>
|
481 |
<?php
|
482 |
}
|
483 |
|
484 |
?>
|
485 |
<div>
|
486 |
-
<label><input type="checkbox" name="importcss" id="importcss" <?php
|
487 |
-
|
488 |
-
<?php _e('Load the CSS classes used in editor-style.css and replace the Formats button ' .
|
489 |
-
'and sub-menu.', 'tinymce-advanced'); ?></label>
|
490 |
</div>
|
491 |
|
492 |
<div>
|
493 |
-
<label><input type="checkbox" name="textpattern" id="textpattern" <?php
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
_e( '
|
498 |
-
|
499 |
-
'same as the markdown syntax so you can type <code># text</code> to create ' .
|
500 |
-
'a header, <code>1. text</code> to create a list, <code>**text**</code> ' .
|
501 |
-
'to make something bold, etc.', 'tinymce-advanced' );
|
502 |
-
?> <a href="http://www.tinymce.com/wiki.php/Configuration:textpattern_patterns" target="_blank"><?php
|
503 |
-
_e('More information', 'tinymce-advanced'); ?></a>
|
504 |
</p>
|
505 |
</div>
|
506 |
|
507 |
<div>
|
508 |
-
<label><input type="checkbox" name="no_autop" id="no_autop" <?php
|
509 |
-
|
510 |
-
|
511 |
-
'in the
|
512 |
-
|
513 |
-
_e( '
|
514 |
-
|
515 |
-
'unexpectedly in rare cases, so test it thoroughly before enabling it ' .
|
516 |
-
'permanently. Line breaks in the HTML editor would still affect the output, ' .
|
517 |
-
'in particular do not use empty lines, line breaks inside HTML tags ' .
|
518 |
-
'or multiple <br /> tags.', 'tinymce-advanced' );
|
519 |
-
?></p>
|
520 |
</div>
|
521 |
|
522 |
<div>
|
523 |
-
<label><input type="checkbox" name="fontsize_formats" id="fontsize_formats" <?php
|
524 |
-
|
525 |
-
|
526 |
-
<p><?php
|
527 |
-
_e( 'Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px 20px 24px 28px 32px 36px.', 'tinymce-advanced' );
|
528 |
-
?></p>
|
529 |
</div>
|
530 |
|
531 |
<div>
|
532 |
-
<label><input type="checkbox" name="paste_images" id="paste_images" <?php
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
_e( '
|
537 |
-
|
538 |
-
|
539 |
-
'but may be useful in some cases for very small images like icons, ' .
|
540 |
-
'not larger than 2-3KB. These images will not be available in ' .
|
541 |
-
'the Media Library.', 'tinymce-advanced' );
|
542 |
-
?></p>
|
543 |
</div>
|
544 |
</div>
|
545 |
|
546 |
<div class="advanced-options">
|
547 |
-
<h3><?php _e('Administration', 'tinymce-advanced'); ?></h3>
|
548 |
<div>
|
549 |
-
<input type="submit" class="button" name="tadv-export-settings" value="<?php
|
550 |
-
|
551 |
-
<input type="submit" class="button" name="tadv-import-settings" value="<?php
|
552 |
-
_e( 'Import Settings', 'tinymce-advanced' ); ?>" />
|
553 |
</div>
|
554 |
</div>
|
555 |
<?php
|
@@ -559,15 +523,12 @@ if ( ! is_multisite() || current_user_can( 'manage_sites' ) ) {
|
|
559 |
|
560 |
<p class="tadv-submit">
|
561 |
<?php wp_nonce_field( 'tadv-save-buttons-order' ); ?>
|
562 |
-
<input class="button" type="submit" name="tadv-restore-defaults" value="<?php
|
563 |
-
|
564 |
-
<input class="button-primary button-large" type="submit" name="tadv-save" value="<?php
|
565 |
-
_e('Save Changes', 'tinymce-advanced'); ?>" />
|
566 |
</p>
|
567 |
</form>
|
568 |
|
569 |
<div id="wp-adv-error-message" class="tadv-error">
|
570 |
-
<?php _e('The [Toolbar toggle] button shows or hides the second, third, and forth button rows. '
|
571 |
-
'It will only work when it is in the first row and there are buttons in the second row.', 'tinymce-advanced'); ?>
|
572 |
</div>
|
573 |
</div><!-- /wrap -->
|
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>
|
151 |
|
152 |
?>
|
153 |
<div class="wrap">
|
154 |
+
<h2><?php _e( 'TinyMCE Advanced Settings Export', 'tinymce-advanced' ); ?></h2>
|
155 |
|
156 |
<div class="tadv-import-export">
|
157 |
<p>
|
158 |
+
<?php _e( 'The settings are exported as a JSON encoded string.', 'tinymce-advanced' ); ?>
|
159 |
+
<?php _e( 'Please copy the content and save it in a <b>text</b> (.txt) file, using a plain text editor like Notepad.', 'tinymce-advanced' ); ?>
|
160 |
+
<?php _e( 'It is important that the export is not changed in any way, no spaces, line breaks, etc.', 'tinymce-advanced' ); ?>
|
|
|
|
|
|
|
|
|
161 |
</p>
|
162 |
|
163 |
<form action="">
|
164 |
<p><textarea readonly="readonly" id="tadv-export"><?php echo json_encode( $output ); ?></textarea></p>
|
165 |
<p><button type="button" class="button" id="tadv-export-select"><?php _e( 'Select All', 'tinymce-advanced' ); ?></button></p>
|
166 |
</form>
|
167 |
+
<p><a href=""><?php _e( 'Back to Editor Settings', 'tinymce-advanced' ); ?></a></p>
|
168 |
</div>
|
169 |
</div>
|
170 |
<?php
|
174 |
// TODO ! admin && ! SA
|
175 |
?>
|
176 |
<div class="wrap">
|
177 |
+
<h2><?php _e( 'TinyMCE Advanced Settings Import', 'tinymce-advanced' ); ?></h2>
|
178 |
|
179 |
<div class="tadv-import-export">
|
180 |
+
<p><?php _e( 'The settings are imported from a JSON encoded string. Please paste the exported string in the text area below.', 'tinymce-advanced' ); ?></p>
|
|
|
|
|
|
|
181 |
|
182 |
<form action="" method="post">
|
183 |
<p><textarea id="tadv-import" name="tadv-import"></textarea></p>
|
184 |
<p>
|
185 |
<button type="button" class="button" id="tadv-import-verify"><?php _e( 'Verify', 'tinymce-advanced' ); ?></button>
|
186 |
+
<input type="submit" class="button button-primary alignright" name="tadv-import-submit" value="<?php _e( 'Import', 'tinymce-advanced' ); ?>" />
|
|
|
187 |
</p>
|
188 |
<?php wp_nonce_field('tadv-import'); ?>
|
189 |
<p id="tadv-import-error"></p>
|
190 |
</form>
|
191 |
+
<p><a href=""><?php _e( 'Back to Editor Settings', 'tinymce-advanced' ); ?></a></p>
|
192 |
</div>
|
193 |
</div>
|
194 |
<?php
|
235 |
$this->load_settings();
|
236 |
|
237 |
if ( empty( $this->toolbar_1 ) && empty( $this->toolbar_2 ) && empty( $this->toolbar_3 ) && empty( $this->toolbar_4 ) ) {
|
238 |
+
$message = '<div class="error"><p>' . __( 'ERROR: All toolbars are empty. Default settings loaded.', 'tinymce-advanced' ) . '</p></div>';
|
|
|
|
|
239 |
|
240 |
$this->admin_settings = $this->default_admin_settings;
|
241 |
$this->settings = $this->default_settings;
|
247 |
|
248 |
?>
|
249 |
<div class="wrap" id="contain">
|
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 {
|
256 |
echo $message;
|
257 |
}
|
260 |
<form id="tadvadmin" method="post" action="">
|
261 |
|
262 |
<p class="tadv-submit">
|
263 |
+
<input class="button-primary button-large" type="submit" name="tadv-save" value="<?php _e( 'Save Changes', 'tinymce-advanced' ); ?>" />
|
264 |
</p>
|
265 |
|
266 |
<div id="tadvzones">
|
267 |
|
268 |
+
<p><?php _e( 'New in TinyMCE 4.0/WordPress 3.9 is the editor menu. When it is enabled, most buttons are also available as menu items.', 'tinymce-advanced' ); ?></p>
|
|
|
269 |
|
270 |
<p><label>
|
271 |
<input type="checkbox" name="menubar" id="menubar" <?php if ( $this->check_setting( 'menubar' ) ) { echo ' checked="checked"'; } ?>>
|
272 |
+
<?php _e( 'Enable the editor menu.', 'tinymce-advanced' ); ?>
|
273 |
</label></p>
|
274 |
|
275 |
<div id="tadv-mce-menu" class="mce-container mce-menubar mce-toolbar mce-first mce-stack-layout-item
|
381 |
?>
|
382 |
</div>
|
383 |
|
384 |
+
<p><?php _e( 'Drag buttons from the unused buttons below and drop them in the toolbars above, or drag the buttons in the toolbars to rearrange them.', 'tinymce-advanced' ); ?></p>
|
|
|
385 |
|
386 |
<div id="unuseddiv">
|
387 |
+
<h3><?php _e( 'Unused Buttons', 'tinymce-advanced' ); ?></h3>
|
388 |
<ul id="unused" class="container">
|
389 |
<?php
|
390 |
|
425 |
</ul>
|
426 |
</div>
|
427 |
|
428 |
+
<p class="tadv-more-plugins"><?php _e( 'Also enable:', 'tinymce-advanced' ); ?>
|
429 |
<label>
|
430 |
<input type="checkbox" name="advlist" id="advlist" <?php if ( $this->check_setting('advlist') ) echo ' checked="checked"'; ?> />
|
431 |
+
<?php _e( 'List Style Options', 'tinymce-advanced' ); ?>
|
432 |
</label>
|
433 |
|
434 |
<label>
|
435 |
+
<input type="checkbox" name="contextmenu" id="contextmenu" <?php if ( $this->check_setting('contextmenu') ) echo ' checked="checked"'; ?> />
|
436 |
+
<?php _e( 'Context Menu', 'tinymce-advanced' ); ?>
|
|
|
437 |
</label>
|
438 |
|
439 |
<label>
|
440 |
<input type="checkbox" name="advlink" id="advlink" <?php if ( $this->check_setting('advlink') ) echo ' checked="checked"'; ?> />
|
441 |
+
<?php _e( 'Link (replaces the Insert/Edit Link dialog)', 'tinymce-advanced' ); ?>
|
442 |
</label>
|
443 |
</p>
|
444 |
|
448 |
|
449 |
?>
|
450 |
<div class="advanced-options">
|
451 |
+
<h3><?php _e( 'Advanced Options', 'tinymce-advanced' ); ?></h3>
|
452 |
<?php
|
453 |
|
454 |
if ( ! is_multisite() && ! current_theme_supports( 'editor-style' ) ) {
|
455 |
|
456 |
?>
|
457 |
<div>
|
458 |
+
<label><input type="checkbox" name="editorstyle" id="editorstyle" <?php if ( $this->check_admin_setting( 'editorstyle' ) ) echo ' checked="checked"'; ?> />
|
459 |
+
<?php _e( 'Import editor-style.css.', 'tinymce-advanced' ); ?></label>
|
460 |
+
<p>
|
461 |
+
<?php _e( 'It seems your theme does not support customised styles for the editor.', 'tinymce-advanced' ); ?>
|
462 |
+
<?php _e( 'You can create a CSS file named <code>editor-style.css</code> and upload it to your theme\'s directory.', 'tinymce-advanced' ); ?>
|
463 |
+
<?php _e( 'After that, enable this setting.', 'tinymce-advanced' ); ?>
|
464 |
+
</p>
|
|
|
465 |
</div>
|
466 |
<?php
|
467 |
}
|
468 |
|
469 |
?>
|
470 |
<div>
|
471 |
+
<label><input type="checkbox" name="importcss" id="importcss" <?php if ( $this->check_admin_setting( 'importcss' ) ) echo ' checked="checked"'; ?> />
|
472 |
+
<?php _e( 'Load the CSS classes used in editor-style.css and replace the Formats button and sub-menu.', 'tinymce-advanced' ); ?></label>
|
|
|
|
|
473 |
</div>
|
474 |
|
475 |
<div>
|
476 |
+
<label><input type="checkbox" name="textpattern" id="textpattern" <?php if ( $this->check_admin_setting('textpattern') ) echo ' checked="checked"'; ?> />
|
477 |
+
<?php _e( 'Markdown typing support (text pattern plugin)', 'tinymce-advanced' ); ?></label>
|
478 |
+
<p>
|
479 |
+
<?php _e( 'This plugin matches special patterns while you type and applies formats or executes commands on the matched text.', 'tinymce-advanced' ); ?>
|
480 |
+
<?php _e( 'The default patterns are the same as the markdown syntax so you can type <code># text</code> to create a header, <code>1. text</code> to create a list, <code>**text**</code> to make it bold, etc.', 'tinymce-advanced' ); ?>
|
481 |
+
<a href="http://www.tinymce.com/wiki.php/Configuration:textpattern_patterns" target="_blank"><?php _e( 'More information', 'tinymce-advanced' ); ?></a>
|
|
|
|
|
|
|
|
|
|
|
482 |
</p>
|
483 |
</div>
|
484 |
|
485 |
<div>
|
486 |
+
<label><input type="checkbox" name="no_autop" id="no_autop" <?php if ( $this->check_admin_setting( 'no_autop' ) ) echo ' checked="checked"'; ?> />
|
487 |
+
<?php _e( 'Stop removing the <p> and <br /> tags when saving and show them in the Text editor', 'tinymce-advanced' ); ?></label>
|
488 |
+
<p>
|
489 |
+
<?php _e( 'This will make it possible to use more advanced coding in the HTML editor without the back-end filtering affecting it much.', 'tinymce-advanced' ); ?>
|
490 |
+
<?php _e( 'However it may behave unexpectedly in rare cases, so test it thoroughly before enabling it permanently.', 'tinymce-advanced' ); ?>
|
491 |
+
<?php _e( 'Line breaks in the HTML editor would still affect the output, in particular do not use empty lines, line breaks inside HTML tags or multiple <br /> tags.', 'tinymce-advanced' ); ?>
|
492 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
493 |
</div>
|
494 |
|
495 |
<div>
|
496 |
+
<label><input type="checkbox" name="fontsize_formats" id="fontsize_formats" <?php if ( $this->check_admin_setting( 'fontsize_formats' ) ) echo ' checked="checked"'; ?> />
|
497 |
+
<?php _e( 'Replace font size settings', 'tinymce-advanced' ); ?></label>
|
498 |
+
<p><?php _e( 'Replaces the size setting available for fonts with: 8px 10px 12px 14px 16px 20px 24px 28px 32px 36px.', 'tinymce-advanced' ); ?></p>
|
|
|
|
|
|
|
499 |
</div>
|
500 |
|
501 |
<div>
|
502 |
+
<label><input type="checkbox" name="paste_images" id="paste_images" <?php if ( $this->check_admin_setting( 'paste_images' ) ) echo ' checked="checked"'; ?> />
|
503 |
+
<?php _e( 'Enable pasting of image source', 'tinymce-advanced' ); ?></label>
|
504 |
+
<p>
|
505 |
+
<?php _e( 'Works only in Firefox and Safari. These browsers support pasting of images directly in the editor and convert them to base64 encoded text.', 'tinymce-advanced' ); ?>
|
506 |
+
<?php _e( 'This is not acceptable for larger images like photos or graphics, but may be useful in some cases for very small images like icons, not larger than 2-3KB.', 'tinymce-advanced' ); ?>
|
507 |
+
<?php _e( 'These images will not be available in the Media Library.', 'tinymce-advanced' ); ?>
|
508 |
+
</p>
|
|
|
|
|
|
|
|
|
509 |
</div>
|
510 |
</div>
|
511 |
|
512 |
<div class="advanced-options">
|
513 |
+
<h3><?php _e( 'Administration', 'tinymce-advanced' ); ?></h3>
|
514 |
<div>
|
515 |
+
<input type="submit" class="button" name="tadv-export-settings" value="<?php _e( 'Export Settings', 'tinymce-advanced' ); ?>" />
|
516 |
+
<input type="submit" class="button" name="tadv-import-settings" value="<?php _e( 'Import Settings', 'tinymce-advanced' ); ?>" />
|
|
|
|
|
517 |
</div>
|
518 |
</div>
|
519 |
<?php
|
523 |
|
524 |
<p class="tadv-submit">
|
525 |
<?php wp_nonce_field( 'tadv-save-buttons-order' ); ?>
|
526 |
+
<input class="button" type="submit" name="tadv-restore-defaults" value="<?php _e( 'Restore Default Settings', 'tinymce-advanced' ); ?>" />
|
527 |
+
<input class="button-primary button-large" type="submit" name="tadv-save" value="<?php _e( 'Save Changes', 'tinymce-advanced' ); ?>" />
|
|
|
|
|
528 |
</p>
|
529 |
</form>
|
530 |
|
531 |
<div id="wp-adv-error-message" class="tadv-error">
|
532 |
+
<?php _e( 'The [Toolbar toggle] button shows or hides the second, third, and forth button rows. It will only work when it is in the first row and there are buttons in the second row.', 'tinymce-advanced' ); ?>
|
|
|
533 |
</div>
|
534 |
</div><!-- /wrap -->
|
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 |
Author: Andrew Ozz
|
8 |
Author URI: http://www.laptoptips.ca/
|
9 |
|
@@ -177,9 +177,9 @@ class Tinymce_Advanced {
|
|
177 |
$this->get_all_buttons();
|
178 |
}
|
179 |
|
180 |
-
// Min version
|
181 |
private function check_minimum_supported_version() {
|
182 |
-
return ( isset( $GLOBALS['wp_db_version'] ) && $GLOBALS['wp_db_version'] >=
|
183 |
}
|
184 |
|
185 |
private function check_plugin_version() {
|
@@ -448,11 +448,12 @@ class Tinymce_Advanced {
|
|
448 |
}
|
449 |
|
450 |
function after_wp_tiny_mce() {
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
|
|
456 |
}
|
457 |
|
458 |
function htmledit( $c ) {
|
@@ -475,7 +476,7 @@ class Tinymce_Advanced {
|
|
475 |
$this->plugins = array();
|
476 |
}
|
477 |
|
478 |
-
if ( $this->check_admin_setting( 'no_autop' )
|
479 |
$this->plugins[] = 'wptadv';
|
480 |
}
|
481 |
|
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 |
|
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() {
|
448 |
}
|
449 |
|
450 |
function after_wp_tiny_mce() {
|
451 |
+
?>
|
452 |
+
<style type="text/css">
|
453 |
+
.wp-fullscreen-wrap .mce-menubar { position: static !important; width: auto !important; }
|
454 |
+
#wp-content-wrap .mce-tinymce.mce-fullscreen .mce-wp-dfw { display: none; }
|
455 |
+
</style>
|
456 |
+
<?php
|
457 |
}
|
458 |
|
459 |
function htmledit( $c ) {
|
476 |
$this->plugins = array();
|
477 |
}
|
478 |
|
479 |
+
if ( $this->check_admin_setting( 'no_autop' ) ) {
|
480 |
$this->plugins[] = 'wptadv';
|
481 |
}
|
482 |
|