@maxisoft/instantcms-mcp 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +308 -0
  3. package/dist/__tests__/artifact-tool.test.js +196 -0
  4. package/dist/__tests__/db-tool.test.js +152 -0
  5. package/dist/__tests__/define-tool.test.js +106 -0
  6. package/dist/__tests__/find-tool.test.js +185 -0
  7. package/dist/__tests__/get-component-api.test.js +144 -0
  8. package/dist/__tests__/hardening.test.js +73 -0
  9. package/dist/__tests__/hooks-tool.test.js +173 -0
  10. package/dist/__tests__/mcp-integration-extra.test.js +166 -0
  11. package/dist/__tests__/mcp-integration.test.js +53 -0
  12. package/dist/__tests__/pagination.test.js +114 -0
  13. package/dist/__tests__/performance-baseline.test.js +56 -0
  14. package/dist/__tests__/project-patch.test.js +144 -0
  15. package/dist/__tests__/project-source.test.js +44 -0
  16. package/dist/__tests__/project-workflows-extra.test.js +165 -0
  17. package/dist/__tests__/project-workflows.test.js +51 -0
  18. package/dist/__tests__/scaffold-addon-roundtrip.test.js +287 -0
  19. package/dist/__tests__/serialization.test.js +170 -0
  20. package/dist/__tests__/source-knowledge-parsers.test.js +42 -0
  21. package/dist/__tests__/template-development.test.js +78 -0
  22. package/dist/__tests__/template-productivity.test.js +87 -0
  23. package/dist/__tests__/tools.test.js +2143 -0
  24. package/dist/data/components.js +2818 -0
  25. package/dist/data/controllers-map.js +7571 -0
  26. package/dist/data/core-api.js +9356 -0
  27. package/dist/data/database-schema.js +4555 -0
  28. package/dist/data/events-map.js +1339 -0
  29. package/dist/data/fields-map.js +3692 -0
  30. package/dist/data/hooks.js +2257 -0
  31. package/dist/data/js-api.js +123 -0
  32. package/dist/data/libs-api.js +264 -0
  33. package/dist/data/routes-map.js +203 -0
  34. package/dist/data/schemas-validation.js +255 -0
  35. package/dist/data/schemas.js +1404 -0
  36. package/dist/data/traits-map.js +1004 -0
  37. package/dist/data/version-profiles.js +41 -0
  38. package/dist/data/widgets-map.js +131 -0
  39. package/dist/data/wysiwyg-map.js +486 -0
  40. package/dist/generated/components-source.js +14748 -0
  41. package/dist/generated/hooks-source.js +3399 -0
  42. package/dist/generated/knowledge-meta.js +101 -0
  43. package/dist/index.js +13 -0
  44. package/dist/registry/database-tools.js +112 -0
  45. package/dist/registry/extension-tools.js +473 -0
  46. package/dist/registry/generator-tools.js +506 -0
  47. package/dist/registry/knowledge-tools.js +441 -0
  48. package/dist/registry/language-tools.js +99 -0
  49. package/dist/registry/meta-tools.js +152 -0
  50. package/dist/registry/project-tools.js +48 -0
  51. package/dist/registry/resources.js +98 -0
  52. package/dist/registry/source-tools.js +211 -0
  53. package/dist/registry/template-development-tools.js +79 -0
  54. package/dist/server.js +32 -0
  55. package/dist/tools/addon-tool.js +1437 -0
  56. package/dist/tools/admin-partial-tool.js +498 -0
  57. package/dist/tools/api-tool.js +294 -0
  58. package/dist/tools/artifact-tool.js +95 -0
  59. package/dist/tools/cache-tool.js +360 -0
  60. package/dist/tools/component-tool.js +415 -0
  61. package/dist/tools/controllers-tool.js +125 -0
  62. package/dist/tools/cron-tool.js +197 -0
  63. package/dist/tools/crud-tool.js +659 -0
  64. package/dist/tools/db-tool.js +198 -0
  65. package/dist/tools/email-tool.js +222 -0
  66. package/dist/tools/external-api-tool.js +596 -0
  67. package/dist/tools/filter-tool.js +341 -0
  68. package/dist/tools/form-tool.js +275 -0
  69. package/dist/tools/grid-tool.js +189 -0
  70. package/dist/tools/hooks-tool.js +104 -0
  71. package/dist/tools/import-export-tool.js +548 -0
  72. package/dist/tools/lang-tool.js +251 -0
  73. package/dist/tools/layout-override-tool.js +125 -0
  74. package/dist/tools/layout-tool.js +548 -0
  75. package/dist/tools/maria-tool.js +127 -0
  76. package/dist/tools/mariadb.js +201 -0
  77. package/dist/tools/migration-tool.js +329 -0
  78. package/dist/tools/oauth-tool.js +520 -0
  79. package/dist/tools/parser/components-parser.js +76 -0
  80. package/dist/tools/parser/controllers-parser.js +313 -0
  81. package/dist/tools/parser/core-parser.js +294 -0
  82. package/dist/tools/parser/coverage-generator.js +424 -0
  83. package/dist/tools/parser/events-parser.js +127 -0
  84. package/dist/tools/parser/fields-parser.js +382 -0
  85. package/dist/tools/parser/hooks-parser.js +106 -0
  86. package/dist/tools/parser/sql-parser.js +197 -0
  87. package/dist/tools/parser/traits-parser.js +161 -0
  88. package/dist/tools/parser/widgets-parser.js +150 -0
  89. package/dist/tools/permission-tool.js +348 -0
  90. package/dist/tools/project-patch-tool.js +73 -0
  91. package/dist/tools/project-source-tool.js +188 -0
  92. package/dist/tools/project-workflow-tool.js +186 -0
  93. package/dist/tools/requirement-tool.js +212 -0
  94. package/dist/tools/scaffold-tool.js +815 -0
  95. package/dist/tools/seo-tool.js +412 -0
  96. package/dist/tools/source-tool.js +155 -0
  97. package/dist/tools/template-development-tool.js +271 -0
  98. package/dist/tools/template-overrides-tool.js +294 -0
  99. package/dist/tools/template-productivity-tool.js +319 -0
  100. package/dist/tools/template-tool.js +665 -0
  101. package/dist/tools/test-tool.js +183 -0
  102. package/dist/tools/webhook-tool.js +427 -0
  103. package/dist/tools/widget-tool.js +331 -0
  104. package/dist/tools/wysiwyg-tool.js +137 -0
  105. package/dist/types/scaffold.js +68 -0
  106. package/dist/utils/define-tool.js +37 -0
  107. package/dist/utils/find-tool.js +97 -0
  108. package/dist/utils/mcp-result.js +18 -0
  109. package/dist/utils/pagination.js +27 -0
  110. package/dist/utils/serialization.js +27 -0
  111. package/package.json +94 -0
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.instantCmsVersionProfiles = void 0;
4
+ exports.compareVersionProfiles = compareVersionProfiles;
5
+ exports.instantCmsVersionProfiles = [
6
+ {
7
+ version: '2.18.2',
8
+ php_min: '7.2',
9
+ status: 'verified',
10
+ notes: ['Текущий профиль source-backed базы знаний'],
11
+ },
12
+ {
13
+ version: '2.18.1',
14
+ php_min: '7.2',
15
+ status: 'compatible',
16
+ notes: ['Предыдущий стабильный профиль; обновитесь до 2.18.2'],
17
+ },
18
+ {
19
+ version: '2.17',
20
+ php_min: '7.2',
21
+ status: 'compatible',
22
+ notes: ['Проверяйте хуки и методы, появившиеся в 2.18'],
23
+ },
24
+ {
25
+ version: '2.16',
26
+ php_min: '7.2',
27
+ status: 'legacy',
28
+ notes: ['Возможны различия backend traits и layout API'],
29
+ },
30
+ ];
31
+ function compareVersionProfiles(from, to) {
32
+ const fromProfile = exports.instantCmsVersionProfiles.find(profile => profile.version === from);
33
+ const toProfile = exports.instantCmsVersionProfiles.find(profile => profile.version === to);
34
+ return {
35
+ from: fromProfile ?? null,
36
+ to: toProfile ?? null,
37
+ warnings: !fromProfile || !toProfile
38
+ ? ['Одна из версий не имеет документированного профиля']
39
+ : [...fromProfile.notes, ...toProfile.notes],
40
+ };
41
+ }
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ // AUTO-GENERATED from source/system/widgets
3
+ // Do not edit manually - run 'npm run parse:widgets' to regenerate
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.widgetsMap = void 0;
6
+ exports.getWidget = getWidget;
7
+ exports.getWidgetsByController = getWidgetsByController;
8
+ exports.getSystemWidgets = getSystemWidgets;
9
+ exports.widgetsMap = {
10
+ "widgets": [
11
+ {
12
+ "name": "html",
13
+ "className": "widgetHtml",
14
+ "controller": "html",
15
+ "filePath": "/.cache/icms2/system/widgets/html/widget.php",
16
+ "hasOptionsForm": true,
17
+ "optionsFormPath": "/.cache/icms2/system/widgets/html/options.form.php"
18
+ },
19
+ {
20
+ "name": "menu",
21
+ "className": "widgetMenu",
22
+ "controller": "menu",
23
+ "filePath": "/.cache/icms2/system/widgets/menu/widget.php",
24
+ "hasOptionsForm": true,
25
+ "optionsFormPath": "/.cache/icms2/system/widgets/menu/options.form.php"
26
+ },
27
+ {
28
+ "name": "template",
29
+ "className": "widgetTemplate",
30
+ "controller": "template",
31
+ "filePath": "/.cache/icms2/system/widgets/template/widget.php",
32
+ "hasOptionsForm": true,
33
+ "optionsFormPath": "/.cache/icms2/system/widgets/template/options.form.php"
34
+ },
35
+ {
36
+ "name": "text",
37
+ "className": "widgetText",
38
+ "controller": "text",
39
+ "filePath": "/.cache/icms2/system/widgets/text/widget.php",
40
+ "hasOptionsForm": true,
41
+ "optionsFormPath": "/.cache/icms2/system/widgets/text/options.form.php"
42
+ }
43
+ ],
44
+ "byName": {
45
+ "html": {
46
+ "name": "html",
47
+ "className": "widgetHtml",
48
+ "controller": "html",
49
+ "filePath": "/.cache/icms2/system/widgets/html/widget.php",
50
+ "hasOptionsForm": true,
51
+ "optionsFormPath": "/.cache/icms2/system/widgets/html/options.form.php"
52
+ },
53
+ "menu": {
54
+ "name": "menu",
55
+ "className": "widgetMenu",
56
+ "controller": "menu",
57
+ "filePath": "/.cache/icms2/system/widgets/menu/widget.php",
58
+ "hasOptionsForm": true,
59
+ "optionsFormPath": "/.cache/icms2/system/widgets/menu/options.form.php"
60
+ },
61
+ "template": {
62
+ "name": "template",
63
+ "className": "widgetTemplate",
64
+ "controller": "template",
65
+ "filePath": "/.cache/icms2/system/widgets/template/widget.php",
66
+ "hasOptionsForm": true,
67
+ "optionsFormPath": "/.cache/icms2/system/widgets/template/options.form.php"
68
+ },
69
+ "text": {
70
+ "name": "text",
71
+ "className": "widgetText",
72
+ "controller": "text",
73
+ "filePath": "/.cache/icms2/system/widgets/text/widget.php",
74
+ "hasOptionsForm": true,
75
+ "optionsFormPath": "/.cache/icms2/system/widgets/text/options.form.php"
76
+ }
77
+ },
78
+ "byController": {
79
+ "html": [
80
+ {
81
+ "name": "html",
82
+ "className": "widgetHtml",
83
+ "controller": "html",
84
+ "filePath": "/.cache/icms2/system/widgets/html/widget.php",
85
+ "hasOptionsForm": true,
86
+ "optionsFormPath": "/.cache/icms2/system/widgets/html/options.form.php"
87
+ }
88
+ ],
89
+ "menu": [
90
+ {
91
+ "name": "menu",
92
+ "className": "widgetMenu",
93
+ "controller": "menu",
94
+ "filePath": "/.cache/icms2/system/widgets/menu/widget.php",
95
+ "hasOptionsForm": true,
96
+ "optionsFormPath": "/.cache/icms2/system/widgets/menu/options.form.php"
97
+ }
98
+ ],
99
+ "template": [
100
+ {
101
+ "name": "template",
102
+ "className": "widgetTemplate",
103
+ "controller": "template",
104
+ "filePath": "/.cache/icms2/system/widgets/template/widget.php",
105
+ "hasOptionsForm": true,
106
+ "optionsFormPath": "/.cache/icms2/system/widgets/template/options.form.php"
107
+ }
108
+ ],
109
+ "text": [
110
+ {
111
+ "name": "text",
112
+ "className": "widgetText",
113
+ "controller": "text",
114
+ "filePath": "/.cache/icms2/system/widgets/text/widget.php",
115
+ "hasOptionsForm": true,
116
+ "optionsFormPath": "/.cache/icms2/system/widgets/text/options.form.php"
117
+ }
118
+ ]
119
+ },
120
+ "widgetCount": 4,
121
+ "generatedAt": "2026-06-04T12:03:09+03:00"
122
+ };
123
+ function getWidget(name) {
124
+ return exports.widgetsMap.byName[name];
125
+ }
126
+ function getWidgetsByController(controller) {
127
+ return exports.widgetsMap.byController[controller] || [];
128
+ }
129
+ function getSystemWidgets() {
130
+ return exports.widgetsMap.byController['_system'] || [];
131
+ }
@@ -0,0 +1,486 @@
1
+ "use strict";
2
+ // WYSIWYG Editors data for InstantCMS 2
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.wysiwygMap = void 0;
5
+ exports.wysiwygMap = {
6
+ editors: [
7
+ {
8
+ name: 'ace',
9
+ className: 'cmsWysiwygAce',
10
+ filePath: '/source/wysiwyg/ace/wysiwyg.class.php',
11
+ optionsFormPath: '/source/wysiwyg/ace/options.php',
12
+ description: 'Редактор кода на основе Ace. Поддерживает подсветку синтаксиса, автодополнение, сниппеты и Emmet.',
13
+ isocode: 'ace',
14
+ options: {
15
+ theme: 'ace/theme/github_light_default',
16
+ mode: 'ace/mode/html',
17
+ wrap: true,
18
+ fontSize: 14,
19
+ enableBasicAutocompletion: true,
20
+ enableSnippets: true,
21
+ enableEmmet: false,
22
+ showLineNumbers: true,
23
+ enableLiveAutocompletion: true,
24
+ newLineMode: 'unix',
25
+ autoScrollEditorIntoView: true,
26
+ minLines: 20,
27
+ maxLines: 40,
28
+ },
29
+ optionsDescriptions: {
30
+ theme: {
31
+ type: 'string',
32
+ description: 'Тема оформления редактора',
33
+ default: 'ace/theme/github_light_default',
34
+ },
35
+ mode: {
36
+ type: 'string',
37
+ description: 'Режим подсветки синтаксиса (ace/mode/html, ace/mode/php, ace/mode/javascript)',
38
+ default: 'ace/mode/html',
39
+ },
40
+ wrap: { type: 'boolean', description: 'Перенос строк', default: true },
41
+ fontSize: { type: 'number', description: 'Размер шрифта в пикселях', default: 14 },
42
+ enableBasicAutocompletion: {
43
+ type: 'boolean',
44
+ description: 'Базовая автоподстановка',
45
+ default: true,
46
+ },
47
+ enableSnippets: { type: 'boolean', description: 'Поддержка сниппетов', default: true },
48
+ enableEmmet: {
49
+ type: 'boolean',
50
+ description: 'Поддержка Emmet (быстрый ввод HTML)',
51
+ default: false,
52
+ },
53
+ showLineNumbers: { type: 'boolean', description: 'Показывать номера строк', default: true },
54
+ enableLiveAutocompletion: {
55
+ type: 'boolean',
56
+ description: 'Живая автоподстановка',
57
+ default: true,
58
+ },
59
+ showInvisibles: {
60
+ type: 'boolean',
61
+ description: 'Показывать невидимые символы',
62
+ default: false,
63
+ },
64
+ showGutter: {
65
+ type: 'boolean',
66
+ description: 'Показывать gutter (зону номеров строк)',
67
+ default: true,
68
+ },
69
+ displayIndentGuides: {
70
+ type: 'boolean',
71
+ description: 'Показывать направляющие отступов',
72
+ default: true,
73
+ },
74
+ },
75
+ features: [
76
+ 'Подсветка синтаксиса',
77
+ 'Автодополнение кода',
78
+ ' сниппеты',
79
+ 'Emmet',
80
+ 'Темы оформления',
81
+ 'Минимум/максимум строк',
82
+ ],
83
+ },
84
+ {
85
+ name: 'markitup',
86
+ className: 'cmsWysiwygMarkitup',
87
+ filePath: '/source/wysiwyg/markitup/wysiwyg.class.php',
88
+ optionsFormPath: '/source/wysiwyg/markitup/options.php',
89
+ description: 'Легковесный редактор разметки. Генерирует HTML код без визуального редактирования. Подходит для технических пользователей.',
90
+ isocode: 'markitup',
91
+ options: {
92
+ skin: 'simple',
93
+ },
94
+ optionsDescriptions: {
95
+ buttons: {
96
+ type: 'array',
97
+ description: 'IDs кнопок для отображения в тулбаре (0=Bold, 1=Italic, 2=Underline, 3=Strikethrough, 4=Unordered list, 5=Ordered list, 6=Quote, 7=Link, 8=Image URL, 9=Image Upload, 10=YouTube, 11=Facebook video, 12=Code, 13=Spoiler, 14=Smiles)',
98
+ default: [0, 1, 2, 3, 9, 14],
99
+ },
100
+ skin: { type: 'string', description: 'Скин оформления', default: 'simple' },
101
+ },
102
+ buttons: [
103
+ { name: 'Bold', key: 'B', className: 'btnBold', openWith: '<b>', closeWith: '</b>' },
104
+ { name: 'Italic', key: 'I', className: 'btnItalic', openWith: '<i>', closeWith: '</i>' },
105
+ {
106
+ name: 'Underline',
107
+ key: 'U',
108
+ className: 'btnUnderline',
109
+ openWith: '<u>',
110
+ closeWith: '</u>',
111
+ },
112
+ {
113
+ name: 'Strikethrough',
114
+ key: 'S',
115
+ className: 'btnStroke',
116
+ openWith: '<s>',
117
+ closeWith: '</s>',
118
+ },
119
+ {
120
+ name: 'Unordered list',
121
+ className: 'btnOl',
122
+ multiline: true,
123
+ openBlockWith: '<ul>\n',
124
+ closeBlockWith: '\n</ul>',
125
+ openWith: '<li>',
126
+ closeWith: '</li>',
127
+ },
128
+ {
129
+ name: 'Ordered list',
130
+ className: 'btnUl',
131
+ multiline: true,
132
+ openBlockWith: '<ol>\n',
133
+ closeBlockWith: '\n</ol>',
134
+ openWith: '<li>',
135
+ closeWith: '</li>',
136
+ },
137
+ {
138
+ name: 'Quote',
139
+ className: 'btnQuote',
140
+ openWith: '<blockquote>',
141
+ closeWith: '</blockquote>',
142
+ },
143
+ {
144
+ name: 'Link',
145
+ key: 'L',
146
+ className: 'btnLink',
147
+ openWith: '<a target="_blank" href="[![:https://]!]">',
148
+ closeWith: '</a>',
149
+ },
150
+ {
151
+ name: 'Image URL',
152
+ className: 'btnImg',
153
+ replaceWith: '<img src="[![:https://]!]" alt="[!]!">',
154
+ },
155
+ { name: 'Image Upload', className: 'btnImgUpload', beforeInsert: true },
156
+ {
157
+ name: 'YouTube',
158
+ className: 'btnVideoYoutube',
159
+ openWith: '<youtube>[!]!',
160
+ closeWith: '</youtube>',
161
+ },
162
+ {
163
+ name: 'Facebook video',
164
+ className: 'btnVideoFacebook',
165
+ openWith: '<facebook>[!]!',
166
+ closeWith: '</facebook>',
167
+ },
168
+ {
169
+ name: 'Code',
170
+ className: 'btnCode',
171
+ openWith: '<code type="[![:php]!]">',
172
+ closeWith: '</code>',
173
+ },
174
+ {
175
+ name: 'Spoiler',
176
+ className: 'btnSpoiler',
177
+ openWith: '<spoiler title="[![:!]!">',
178
+ closeWith: '</spoiler>',
179
+ },
180
+ { name: 'Smiles', key: 'Z', className: 'btnSmiles', beforeInsert: true },
181
+ ],
182
+ features: [
183
+ 'BB-code стиль ввода',
184
+ 'Быстрые клавиши',
185
+ 'Загрузка изображений',
186
+ 'Вставка видео (YouTube, Facebook)',
187
+ 'Сниппеты кода',
188
+ 'Смайлы',
189
+ ],
190
+ },
191
+ {
192
+ name: 'redactor',
193
+ className: 'cmsWysiwygRedactor',
194
+ filePath: '/source/wysiwyg/redactor/wysiwyg.class.php',
195
+ optionsFormPath: '/source/wysiwyg/redactor/options.php',
196
+ description: 'Imperavi Redactor - визуальный WYSIWYG редактор. Популярный выбор для большинства сайтов.',
197
+ isocode: 'redactor',
198
+ options: {
199
+ minHeight: 200,
200
+ toolbarFixedBox: false,
201
+ plugins: ['smiles', 'spoiler'],
202
+ },
203
+ optionsDescriptions: {
204
+ plugins: {
205
+ type: 'array',
206
+ description: 'Плагины: clips, fontcolor, fontfamily, fontsize, fullscreen, smiles, spoiler, textdirection',
207
+ default: ['smiles', 'spoiler'],
208
+ },
209
+ buttons: {
210
+ type: 'array',
211
+ description: 'Кнопки тулбара',
212
+ default: [
213
+ 'html',
214
+ 'undo',
215
+ 'redo',
216
+ 'bold',
217
+ 'italic',
218
+ 'deleted',
219
+ 'unorderedlist',
220
+ 'orderedlist',
221
+ 'outdent',
222
+ 'indent',
223
+ 'image',
224
+ 'video',
225
+ 'table',
226
+ 'link',
227
+ 'alignment',
228
+ ],
229
+ },
230
+ convertVideoLinks: {
231
+ type: 'boolean',
232
+ description: 'Конвертировать ссылки YouTube/Vimeo в видео',
233
+ default: true,
234
+ },
235
+ convertDivs: {
236
+ type: 'boolean',
237
+ description: 'Конвертировать div в paragraph',
238
+ default: false,
239
+ },
240
+ toolbarFixedBox: {
241
+ type: 'boolean',
242
+ description: 'Фиксированная панель инструментов',
243
+ default: true,
244
+ },
245
+ autoresize: { type: 'boolean', description: 'Автоматическая высота', default: true },
246
+ pastePlainText: {
247
+ type: 'boolean',
248
+ description: 'Вставлять как простой текст',
249
+ default: false,
250
+ },
251
+ removeEmptyTags: {
252
+ type: 'boolean',
253
+ description: 'Удалять пустые теги при сохранении',
254
+ default: true,
255
+ },
256
+ linkNofollow: {
257
+ type: 'boolean',
258
+ description: 'Добавлять rel=nofollow к ссылкам',
259
+ default: false,
260
+ },
261
+ minHeight: { type: 'number', description: 'Минимальная высота в пикселях', default: 200 },
262
+ placeholder: { type: 'string', description: 'Текст-подсказка в пустом поле' },
263
+ },
264
+ plugins: [
265
+ { name: 'clips', description: 'Заготовки текста (clips)' },
266
+ { name: 'fontcolor', description: 'Цвет текста' },
267
+ { name: 'fontfamily', description: 'Шрифт текста' },
268
+ { name: 'fontsize', description: 'Размер шрифта' },
269
+ { name: 'fullscreen', description: 'Полноэкранный режим' },
270
+ { name: 'smiles', description: 'Смайлы и эмотиконы' },
271
+ { name: 'spoiler', description: 'Сворачиваемый текст (спойлер)' },
272
+ { name: 'textdirection', description: 'Направление текста RTL/LTR' },
273
+ ],
274
+ buttons: [
275
+ 'html',
276
+ 'undo',
277
+ 'redo',
278
+ 'formatting',
279
+ 'bold',
280
+ 'italic',
281
+ 'deleted',
282
+ 'unorderedlist',
283
+ 'orderedlist',
284
+ 'outdent',
285
+ 'indent',
286
+ 'image',
287
+ 'video',
288
+ 'table',
289
+ 'link',
290
+ 'alignment',
291
+ 'horizontalrule',
292
+ 'underline',
293
+ 'alignleft',
294
+ 'aligncenter',
295
+ 'alignright',
296
+ 'justify',
297
+ ],
298
+ features: [
299
+ 'Визуальное редактирование',
300
+ 'Drag & drop изображений',
301
+ 'Вставка видео',
302
+ 'Таблицы',
303
+ 'Смайлы',
304
+ 'Спойлеры',
305
+ 'Клипы (заготовки)',
306
+ ],
307
+ },
308
+ {
309
+ name: 'tinymce',
310
+ className: 'cmsWysiwygTinymce',
311
+ filePath: '/source/wysiwyg/tinymce/wysiwyg.class.php',
312
+ optionsFormPath: '/source/wysiwyg/tinymce/options.php',
313
+ description: 'TinyMCE - мощный WYSIWYG редактор с гибкой настройкой тулбара и большим количеством плагинов.',
314
+ isocode: 'tinymce',
315
+ options: {
316
+ plugins: ['autoresize'],
317
+ toolbar: 'blocks | bold italic strikethrough forecolor backcolor | link image media table | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat',
318
+ min_height: 200,
319
+ max_height: 700,
320
+ browser_spellcheck: true,
321
+ contextmenu: false,
322
+ menubar: false,
323
+ statusbar: false,
324
+ relative_urls: false,
325
+ convert_urls: false,
326
+ paste_data_images: true,
327
+ highlight_on_focus: true,
328
+ link_quicklink: true,
329
+ link_context_toolbar: true,
330
+ image_caption: false,
331
+ toolbar_mode: 'floating',
332
+ toolbar_sticky: false,
333
+ skin: 'oxide',
334
+ images_preset: 'big',
335
+ placeholder: '',
336
+ license_key: 'gpl',
337
+ referrer_policy: 'origin',
338
+ sandbox_iframes: false,
339
+ },
340
+ optionsDescriptions: {
341
+ toolbar: { type: 'string', description: 'Кнопки тулбара через | (pipe)' },
342
+ quickbars_selection_toolbar: {
343
+ type: 'string',
344
+ description: 'Быстрый тулбар при выделении текста',
345
+ },
346
+ quickbars_insert_toolbar: { type: 'string', description: 'Быстрый тулбар при вставке' },
347
+ plugins: {
348
+ type: 'array',
349
+ description: 'Плагины: advlist, anchor, autolink, autoresize, charmap, code, codesample, emoticons, fullscreen, icmsinsertfile, icmsspoiler, image, insertdatetime, link, lists, media, nonbreaking, quickbars, searchreplace, smiles, table, wordcount',
350
+ default: ['autoresize'],
351
+ },
352
+ skin: { type: 'string', description: 'Скин: oxide, oxide-dark', default: 'oxide' },
353
+ forced_root_block: { type: 'string', description: 'Тег обёртки: p или div', default: 'p' },
354
+ newline_behavior: {
355
+ type: 'string',
356
+ description: 'Поведение Enter: default, block, linebreak, invert',
357
+ default: 'default',
358
+ },
359
+ block_formats: {
360
+ type: 'array',
361
+ description: 'Форматы абзацев: p, h2, h3, h4, h5, h6',
362
+ default: ['p', 'h2', 'h3'],
363
+ },
364
+ toolbar_mode: {
365
+ type: 'string',
366
+ description: 'Режим тулбара: wrap, floating, sliding, scrolling',
367
+ default: 'floating',
368
+ },
369
+ toolbar_sticky: { type: 'boolean', description: 'Прилипающий тулбар', default: false },
370
+ image_caption: { type: 'boolean', description: 'Подпись к изображению', default: false },
371
+ image_title: {
372
+ type: 'boolean',
373
+ description: 'Атрибут title у изображения',
374
+ default: false,
375
+ },
376
+ image_description: {
377
+ type: 'boolean',
378
+ description: 'Атрибут alt у изображения',
379
+ default: false,
380
+ },
381
+ image_dimensions: { type: 'boolean', description: 'Размеры изображения', default: false },
382
+ image_advtab: {
383
+ type: 'boolean',
384
+ description: 'Расширенные настройки изображения',
385
+ default: false,
386
+ },
387
+ statusbar: { type: 'boolean', description: 'Показывать статусную строку', default: false },
388
+ min_height: { type: 'number', description: 'Минимальная высота в пикселях', default: 350 },
389
+ max_height: { type: 'number', description: 'Максимальная высота в пикселях', default: 700 },
390
+ placeholder: { type: 'string', description: 'Текст-подсказка в пустом поле' },
391
+ images_preset: {
392
+ type: 'string',
393
+ description: 'Прессет обработки изображений',
394
+ default: 'big',
395
+ },
396
+ },
397
+ plugins: [
398
+ { name: 'advlist', description: 'Расширенные списки' },
399
+ { name: 'anchor', description: 'Якоря' },
400
+ { name: 'autolink', description: 'Автоматическое создание ссылок' },
401
+ { name: 'autoresize', description: 'Автоматическая высота' },
402
+ { name: 'charmap', description: 'Специальные символы' },
403
+ { name: 'code', description: 'Исходный код' },
404
+ { name: 'codesample', description: 'Подсветка кода с примерами языков' },
405
+ { name: 'emoticons', description: 'Эмотиконы/смайлы' },
406
+ { name: 'fullscreen', description: 'Полноэкранный режим' },
407
+ { name: 'icmsinsertfile', description: 'Вставка файлов (InstantCMS)' },
408
+ { name: 'icmsspoiler', description: 'Спойлер (InstantCMS)' },
409
+ { name: 'image', description: 'Вставка изображений' },
410
+ { name: 'insertdatetime', description: 'Дата и время' },
411
+ { name: 'link', description: 'Ссылки' },
412
+ { name: 'lists', description: 'Списки (bullist, numlist)' },
413
+ { name: 'media', description: 'Вставка видео/аудио' },
414
+ { name: 'nonbreaking', description: 'Неразрывный пробел' },
415
+ { name: 'quickbars', description: 'Быстрый тулбар' },
416
+ { name: 'searchreplace', description: 'Поиск и замена' },
417
+ { name: 'smiles', description: 'Смайлы (InstantCMS)' },
418
+ { name: 'table', description: 'Таблицы' },
419
+ { name: 'wordcount', description: 'Счётчик слов' },
420
+ ],
421
+ buttons: [
422
+ 'bold',
423
+ 'italic',
424
+ 'underline',
425
+ 'strikethrough',
426
+ 'alignleft',
427
+ 'aligncenter',
428
+ 'alignright',
429
+ 'alignjustify',
430
+ 'alignnone',
431
+ 'styles',
432
+ 'blocks',
433
+ 'fontfamily',
434
+ 'fontsize',
435
+ 'cut',
436
+ 'copy',
437
+ 'paste',
438
+ 'outdent',
439
+ 'indent',
440
+ 'blockquote',
441
+ 'undo',
442
+ 'redo',
443
+ 'removeformat',
444
+ 'subscript',
445
+ 'superscript',
446
+ 'visualaid',
447
+ 'insert',
448
+ 'forecolor',
449
+ 'backcolor',
450
+ '|',
451
+ 'wordcount',
452
+ 'nonbreaking',
453
+ 'media',
454
+ 'insertdatetime',
455
+ 'image',
456
+ 'fullscreen',
457
+ 'code',
458
+ 'charmap',
459
+ 'anchor',
460
+ 'smiles',
461
+ 'emoticons',
462
+ 'codesample',
463
+ 'icmsspoiler',
464
+ 'lists',
465
+ 'link',
466
+ 'table',
467
+ ],
468
+ features: [
469
+ 'Гибкий тулбар',
470
+ 'Поддержка плагинов',
471
+ 'Темы оформления (skin)',
472
+ 'Автозагрузка изображений',
473
+ 'Группы пользователей',
474
+ 'Сниппеты кода',
475
+ 'Спойлер',
476
+ 'Эмодзи',
477
+ ],
478
+ },
479
+ ],
480
+ byName: {},
481
+ editorCount: 4,
482
+ };
483
+ // Build byName index
484
+ exports.wysiwygMap.editors.forEach(editor => {
485
+ exports.wysiwygMap.byName[editor.name] = editor;
486
+ });