jodit 3.13.1 → 3.13.2
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.
- package/.idea/workspace.xml +21 -18
- package/build/jodit.css +9 -9
- package/build/jodit.es2018.css +8 -8
- package/build/jodit.es2018.en.css +8 -8
- package/build/jodit.es2018.en.js +34 -29
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -1
- package/build/jodit.es2018.js +34 -29
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -1
- package/build/jodit.js +33 -28
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -1
- package/package.json +3 -3
- package/src/core/ui/element.ts +1 -2
- package/src/index.ts +8 -8
- package/src/modules/image-editor/templates/form.ts +2 -2
- package/src/modules/toolbar/button/button.ts +47 -5
- package/src/modules/toolbar/collection/collection.ts +3 -29
- package/src/modules/toolbar/collection/editor-collection.ts +1 -5
- package/src/styles/form.less +1 -1
- package/src/types/ui.d.ts +2 -1
- package/types/core/ui/element.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/modules/toolbar/button/button.d.ts +8 -0
- package/types/modules/toolbar/collection/collection.d.ts +2 -2
- package/types/types/{types/ajax.d.ts → ajax.d.ts} +0 -0
- package/types/types/{types/async.d.ts → async.d.ts} +0 -0
- package/types/types/{types/context.d.ts → context.d.ts} +0 -0
- package/types/types/{types/core.ts → core.ts} +0 -0
- package/types/types/{types/create.d.ts → create.d.ts} +0 -0
- package/types/types/{types/dialog.d.ts → dialog.d.ts} +0 -0
- package/types/types/{types/events.d.ts → events.d.ts} +0 -0
- package/types/types/{types/file-browser.d.ts → file-browser.d.ts} +0 -0
- package/types/types/{types/form.d.ts → form.d.ts} +0 -0
- package/types/types/{types/index.d.ts → index.d.ts} +0 -0
- package/types/types/{types/jodit.d.ts → jodit.d.ts} +0 -0
- package/types/types/{types/observer.d.ts → observer.d.ts} +0 -0
- package/types/types/{types/plugin.d.ts → plugin.d.ts} +0 -0
- package/types/types/{types/popup.d.ts → popup.d.ts} +0 -0
- package/types/types/{types/select.d.ts → select.d.ts} +0 -0
- package/types/types/{types/source.d.ts → source.d.ts} +0 -0
- package/types/types/{types/storage.ts → storage.ts} +0 -0
- package/types/types/{types/style.d.ts → style.d.ts} +0 -0
- package/types/types/{types/toolbar.d.ts → toolbar.d.ts} +0 -0
- package/types/types/{types/traits.d.ts → traits.d.ts} +0 -0
- package/types/types/{types/types.d.ts → types.d.ts} +0 -0
- package/types/types/{types/ui.d.ts → ui.d.ts} +2 -1
- /package/types/types/{types/uploader.d.ts → uploader.d.ts} +0 -0
- /package/types/types/{types/view.d.ts → view.d.ts} +0 -0
package/.idea/workspace.xml
CHANGED
|
@@ -11,13 +11,9 @@
|
|
|
11
11
|
<select />
|
|
12
12
|
</component>
|
|
13
13
|
<component name="ChangeListManager">
|
|
14
|
-
<list default="true" id="5da7ff7f-03a8-49de-9fbb-8f8640d83b83" name="Default Changelist" comment="
|
|
15
|
-
<change beforePath="$PROJECT_DIR$/CHANGELOG.MD" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.MD" afterDir="false" />
|
|
16
|
-
<change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
|
|
14
|
+
<list default="true" id="5da7ff7f-03a8-49de-9fbb-8f8640d83b83" name="Default Changelist" comment="Partially fixed bug when building Jodit with babel minimizer, some classes are not defined as instanceof">
|
|
17
15
|
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
18
|
-
<change beforePath="$PROJECT_DIR$/src/
|
|
19
|
-
<change beforePath="$PROJECT_DIR$/test/test.html" beforeDir="false" afterPath="$PROJECT_DIR$/test/test.html" afterDir="false" />
|
|
20
|
-
<change beforePath="$PROJECT_DIR$/test/tests/units/positionTest.js" beforeDir="false" afterPath="$PROJECT_DIR$/test/tests/units/positionTest.js" afterDir="false" />
|
|
16
|
+
<change beforePath="$PROJECT_DIR$/src/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.ts" afterDir="false" />
|
|
21
17
|
</list>
|
|
22
18
|
<list id="5049e1d4-15bc-4e3a-b46b-d2ce7537fc13" name="Revert "Some small fixes"" comment="Revert "Some small fixes" This reverts commit bc391ec6" />
|
|
23
19
|
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -126,7 +122,7 @@
|
|
|
126
122
|
<property name="nodejs_package_manager_path" value="npm" />
|
|
127
123
|
<property name="prettierjs.PrettierConfiguration.Package" value="$PROJECT_DIR$/node_modules/prettier" />
|
|
128
124
|
<property name="run.code.analysis.last.selected.profile" value="pProject Default" />
|
|
129
|
-
<property name="settings.editor.selected.configurable" value="
|
|
125
|
+
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
|
|
130
126
|
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
|
|
131
127
|
<property name="typescript-compiler-editor-notification" value="false" />
|
|
132
128
|
<property name="vue.rearranger.settings.migration" value="true" />
|
|
@@ -792,14 +788,8 @@
|
|
|
792
788
|
<workItem from="1643144936871" duration="15005000" />
|
|
793
789
|
<workItem from="1643294541271" duration="2471000" />
|
|
794
790
|
<workItem from="1643301903480" duration="2323000" />
|
|
795
|
-
<workItem from="1643305897066" duration="
|
|
796
|
-
|
|
797
|
-
<task id="LOCAL-00930" summary="Fixed doc hook">
|
|
798
|
-
<created>1641391954015</created>
|
|
799
|
-
<option name="number" value="00930" />
|
|
800
|
-
<option name="presentableId" value="LOCAL-00930" />
|
|
801
|
-
<option name="project" value="LOCAL" />
|
|
802
|
-
<updated>1641391954015</updated>
|
|
791
|
+
<workItem from="1643305897066" duration="2664000" />
|
|
792
|
+
<workItem from="1643574592672" duration="9281000" />
|
|
803
793
|
</task>
|
|
804
794
|
<task id="LOCAL-00931" summary="Fixed docs link">
|
|
805
795
|
<created>1641392078670</created>
|
|
@@ -1137,11 +1127,24 @@
|
|
|
1137
1127
|
<option name="project" value="LOCAL" />
|
|
1138
1128
|
<updated>1643304519949</updated>
|
|
1139
1129
|
</task>
|
|
1140
|
-
<
|
|
1130
|
+
<task id="LOCAL-00979" summary="Partially fixed bug when building Jodit with babel minimizer, some classes are not defined as instanceof">
|
|
1131
|
+
<created>1643581406596</created>
|
|
1132
|
+
<option name="number" value="00979" />
|
|
1133
|
+
<option name="presentableId" value="LOCAL-00979" />
|
|
1134
|
+
<option name="project" value="LOCAL" />
|
|
1135
|
+
<updated>1643581406610</updated>
|
|
1136
|
+
</task>
|
|
1137
|
+
<option name="localTasksCounter" value="980" />
|
|
1141
1138
|
<servers />
|
|
1142
1139
|
</component>
|
|
1143
1140
|
<component name="TypeScriptGeneratedFilesManager">
|
|
1144
1141
|
<option name="version" value="3" />
|
|
1142
|
+
<option name="exactExcludedFiles">
|
|
1143
|
+
<list>
|
|
1144
|
+
<option value="$PROJECT_DIR$/types/types/core.d.ts" />
|
|
1145
|
+
<option value="$PROJECT_DIR$/types/types/storage.d.ts" />
|
|
1146
|
+
</list>
|
|
1147
|
+
</option>
|
|
1145
1148
|
</component>
|
|
1146
1149
|
<component name="UnknownFeatures">
|
|
1147
1150
|
<option featureType="com.intellij.configurationType" implementationName="BashConfigurationType" />
|
|
@@ -1277,7 +1280,6 @@
|
|
|
1277
1280
|
</component>
|
|
1278
1281
|
<component name="VcsManagerConfiguration">
|
|
1279
1282
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
1280
|
-
<MESSAGE value="Fixed Full Screen showing elements not part of editable content #763 Issue: https://github.com/xdan/jodit/issues/763" />
|
|
1281
1283
|
<MESSAGE value="Added documentation for helpers module" />
|
|
1282
1284
|
<MESSAGE value="Remove `dialog` field from IFileBrowser" />
|
|
1283
1285
|
<MESSAGE value="Remove `elementsMap` field from IFileBrowser" />
|
|
@@ -1302,7 +1304,8 @@
|
|
|
1302
1304
|
<MESSAGE value="Change doc" />
|
|
1303
1305
|
<MESSAGE value="Change observable system" />
|
|
1304
1306
|
<MESSAGE value="Fixed tests fow Windows" />
|
|
1305
|
-
<
|
|
1307
|
+
<MESSAGE value="Partially fixed bug when building Jodit with babel minimizer, some classes are not defined as instanceof" />
|
|
1308
|
+
<option name="LAST_COMMIT_MESSAGE" value="Partially fixed bug when building Jodit with babel minimizer, some classes are not defined as instanceof" />
|
|
1306
1309
|
</component>
|
|
1307
1310
|
<component name="XDebuggerManager">
|
|
1308
1311
|
<breakpoint-manager>
|
package/build/jodit.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
|
|
4
|
-
* Version: v3.13.
|
|
4
|
+
* Version: v3.13.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
|
|
11
|
-
* Version: v3.13.
|
|
11
|
+
* Version: v3.13.2
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|
|
@@ -310,18 +310,18 @@
|
|
|
310
310
|
height: 16px;
|
|
311
311
|
vertical-align: middle;
|
|
312
312
|
}
|
|
313
|
-
.
|
|
313
|
+
.jodit-switcher {
|
|
314
314
|
position: relative;
|
|
315
315
|
display: inline-block;
|
|
316
316
|
width: 60px;
|
|
317
317
|
height: 32px;
|
|
318
318
|
}
|
|
319
|
-
.
|
|
319
|
+
.jodit-switcher input {
|
|
320
320
|
width: 0;
|
|
321
321
|
height: 0;
|
|
322
322
|
opacity: 0;
|
|
323
323
|
}
|
|
324
|
-
.
|
|
324
|
+
.jodit-switcher .jodit-switcher__slider {
|
|
325
325
|
position: absolute;
|
|
326
326
|
top: 0;
|
|
327
327
|
right: 0;
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
-o-transition: 0.4s;
|
|
335
335
|
transition: 0.4s;
|
|
336
336
|
}
|
|
337
|
-
.
|
|
337
|
+
.jodit-switcher .jodit-switcher__slider:before {
|
|
338
338
|
position: absolute;
|
|
339
339
|
bottom: 4px;
|
|
340
340
|
left: 4px;
|
|
@@ -347,15 +347,15 @@
|
|
|
347
347
|
-o-transition: 0.4s;
|
|
348
348
|
transition: 0.4s;
|
|
349
349
|
}
|
|
350
|
-
input:checked + .
|
|
350
|
+
input:checked + .jodit-switcher__slider {
|
|
351
351
|
background-color: #2196f3;
|
|
352
352
|
}
|
|
353
|
-
input:checked + .
|
|
353
|
+
input:checked + .jodit-switcher__slider:before {
|
|
354
354
|
-webkit-transform: translateX(calc(60px - 4px * 2 - calc(32px - 4px * 2)));
|
|
355
355
|
-ms-transform: translateX(calc(60px - 4px * 2 - calc(32px - 4px * 2)));
|
|
356
356
|
transform: translateX(calc(60px - 4px * 2 - calc(32px - 4px * 2)));
|
|
357
357
|
}
|
|
358
|
-
input:focus + .
|
|
358
|
+
input:focus + .jodit-switcher__slider {
|
|
359
359
|
-webkit-box-shadow: 0 0 1px #2196f3;
|
|
360
360
|
box-shadow: 0 0 1px #2196f3;
|
|
361
361
|
}
|
package/build/jodit.es2018.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
|
|
4
|
-
* Version: v3.13.
|
|
4
|
+
* Version: v3.13.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -306,18 +306,18 @@
|
|
|
306
306
|
height: 16px;
|
|
307
307
|
vertical-align: middle;
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.jodit-switcher {
|
|
310
310
|
position: relative;
|
|
311
311
|
display: inline-block;
|
|
312
312
|
width: var(--jd-switche-width);
|
|
313
313
|
height: var(--jd-switche-height);
|
|
314
314
|
}
|
|
315
|
-
.
|
|
315
|
+
.jodit-switcher input {
|
|
316
316
|
width: 0;
|
|
317
317
|
height: 0;
|
|
318
318
|
opacity: 0;
|
|
319
319
|
}
|
|
320
|
-
.
|
|
320
|
+
.jodit-switcher .jodit-switcher__slider {
|
|
321
321
|
position: absolute;
|
|
322
322
|
top: 0;
|
|
323
323
|
right: 0;
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
cursor: pointer;
|
|
329
329
|
transition: 0.4s;
|
|
330
330
|
}
|
|
331
|
-
.
|
|
331
|
+
.jodit-switcher .jodit-switcher__slider:before {
|
|
332
332
|
position: absolute;
|
|
333
333
|
bottom: var(--jd-switche-slider-margin);
|
|
334
334
|
left: var(--jd-switche-slider-margin);
|
|
@@ -339,13 +339,13 @@
|
|
|
339
339
|
content: '';
|
|
340
340
|
transition: 0.4s;
|
|
341
341
|
}
|
|
342
|
-
input:checked + .
|
|
342
|
+
input:checked + .jodit-switcher__slider {
|
|
343
343
|
background-color: var(--jd-color-background-active);
|
|
344
344
|
}
|
|
345
|
-
input:checked + .
|
|
345
|
+
input:checked + .jodit-switcher__slider:before {
|
|
346
346
|
transform: translateX(calc(var(--jd-switche-width) - var(--jd-switche-slider-margin) * 2 - var(--jd-switche-slider-size)));
|
|
347
347
|
}
|
|
348
|
-
input:focus + .
|
|
348
|
+
input:focus + .jodit-switcher__slider {
|
|
349
349
|
box-shadow: 0 0 1px var(--jd-color-background-active);
|
|
350
350
|
}
|
|
351
351
|
/*!
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
|
|
4
|
-
* Version: v3.13.
|
|
4
|
+
* Version: v3.13.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -306,18 +306,18 @@
|
|
|
306
306
|
height: 16px;
|
|
307
307
|
vertical-align: middle;
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.jodit-switcher {
|
|
310
310
|
position: relative;
|
|
311
311
|
display: inline-block;
|
|
312
312
|
width: var(--jd-switche-width);
|
|
313
313
|
height: var(--jd-switche-height);
|
|
314
314
|
}
|
|
315
|
-
.
|
|
315
|
+
.jodit-switcher input {
|
|
316
316
|
width: 0;
|
|
317
317
|
height: 0;
|
|
318
318
|
opacity: 0;
|
|
319
319
|
}
|
|
320
|
-
.
|
|
320
|
+
.jodit-switcher .jodit-switcher__slider {
|
|
321
321
|
position: absolute;
|
|
322
322
|
top: 0;
|
|
323
323
|
right: 0;
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
cursor: pointer;
|
|
329
329
|
transition: 0.4s;
|
|
330
330
|
}
|
|
331
|
-
.
|
|
331
|
+
.jodit-switcher .jodit-switcher__slider:before {
|
|
332
332
|
position: absolute;
|
|
333
333
|
bottom: var(--jd-switche-slider-margin);
|
|
334
334
|
left: var(--jd-switche-slider-margin);
|
|
@@ -339,13 +339,13 @@
|
|
|
339
339
|
content: '';
|
|
340
340
|
transition: 0.4s;
|
|
341
341
|
}
|
|
342
|
-
input:checked + .
|
|
342
|
+
input:checked + .jodit-switcher__slider {
|
|
343
343
|
background-color: var(--jd-color-background-active);
|
|
344
344
|
}
|
|
345
|
-
input:checked + .
|
|
345
|
+
input:checked + .jodit-switcher__slider:before {
|
|
346
346
|
transform: translateX(calc(var(--jd-switche-width) - var(--jd-switche-slider-margin) * 2 - var(--jd-switche-slider-size)));
|
|
347
347
|
}
|
|
348
|
-
input:focus + .
|
|
348
|
+
input:focus + .jodit-switcher__slider {
|
|
349
349
|
box-shadow: 0 0 1px var(--jd-color-background-active);
|
|
350
350
|
}
|
|
351
351
|
/*!
|
package/build/jodit.es2018.en.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
|
|
4
|
-
* Version: v3.13.
|
|
4
|
+
* Version: v3.13.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -11228,7 +11228,7 @@ class View extends component/* Component */.wA {
|
|
|
11228
11228
|
this.isView = true;
|
|
11229
11229
|
this.mods = {};
|
|
11230
11230
|
this.components = new Set();
|
|
11231
|
-
this.version = "3.13.
|
|
11231
|
+
this.version = "3.13.2";
|
|
11232
11232
|
this.async = new Async();
|
|
11233
11233
|
this.buffer = Storage.makeStorage();
|
|
11234
11234
|
this.storage = Storage.makeStorage(true, this.componentName);
|
|
@@ -11326,10 +11326,10 @@ class View extends component/* Component */.wA {
|
|
|
11326
11326
|
return this.__isFullSize;
|
|
11327
11327
|
}
|
|
11328
11328
|
getVersion() {
|
|
11329
|
-
return "3.13.
|
|
11329
|
+
return "3.13.2";
|
|
11330
11330
|
}
|
|
11331
11331
|
static getVersion() {
|
|
11332
|
-
return "3.13.
|
|
11332
|
+
return "3.13.2";
|
|
11333
11333
|
}
|
|
11334
11334
|
initOptions(options) {
|
|
11335
11335
|
this.options = (0,helpers.ConfigProto)(options || {}, (0,helpers.ConfigProto)(this.options || {}, View.defaultOptions));
|
|
@@ -11444,25 +11444,10 @@ let ToolbarCollection = class ToolbarCollection extends ui/* UIList */.bz {
|
|
|
11444
11444
|
return makeButton(this.j, control, target);
|
|
11445
11445
|
}
|
|
11446
11446
|
shouldBeActive(button) {
|
|
11447
|
-
if ((0,helpers.isFunction)(button.control.isActive)) {
|
|
11448
|
-
return button.control.isActive(this.j, button.control, button);
|
|
11449
|
-
}
|
|
11450
11447
|
return undefined;
|
|
11451
11448
|
}
|
|
11452
11449
|
shouldBeDisabled(button) {
|
|
11453
|
-
|
|
11454
|
-
return true;
|
|
11455
|
-
}
|
|
11456
|
-
if (this.j.o.readonly &&
|
|
11457
|
-
(!this.j.o.activeButtonsInReadOnly ||
|
|
11458
|
-
!this.j.o.activeButtonsInReadOnly.includes(button.control.name))) {
|
|
11459
|
-
return true;
|
|
11460
|
-
}
|
|
11461
|
-
let isDisabled;
|
|
11462
|
-
if ((0,helpers.isFunction)(button.control.isDisabled)) {
|
|
11463
|
-
isDisabled = button.control.isDisabled(this.j, button.control, button);
|
|
11464
|
-
}
|
|
11465
|
-
return isDisabled;
|
|
11450
|
+
return undefined;
|
|
11466
11451
|
}
|
|
11467
11452
|
getTarget(button) {
|
|
11468
11453
|
return button.target || null;
|
|
@@ -11567,9 +11552,6 @@ let ToolbarEditorCollection = class ToolbarEditorCollection extends ToolbarColle
|
|
|
11567
11552
|
return !(mode === constants.MODE_SPLIT || mode === this.j.getRealMode());
|
|
11568
11553
|
}
|
|
11569
11554
|
shouldBeActive(button) {
|
|
11570
|
-
if ((0,helpers.isJoditObject)(this.j) && !this.j.editorIsActive) {
|
|
11571
|
-
return false;
|
|
11572
|
-
}
|
|
11573
11555
|
const active = super.shouldBeActive(button);
|
|
11574
11556
|
if (active !== undefined) {
|
|
11575
11557
|
return active;
|
|
@@ -11683,15 +11665,38 @@ let ToolbarButton = class ToolbarButton extends ui_button/* UIButton */.y3 {
|
|
|
11683
11665
|
}
|
|
11684
11666
|
update() {
|
|
11685
11667
|
const { control, state } = this, tc = this.closest(ToolbarCollection);
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
state.activated = Boolean(tc.shouldBeActive(this));
|
|
11689
|
-
}
|
|
11668
|
+
state.disabled = this.calculateDisabledStatus(tc);
|
|
11669
|
+
state.activated = this.calculateActivatedStatus(tc);
|
|
11690
11670
|
if ((0,helpers.isFunction)(control.update)) {
|
|
11691
11671
|
control.update(this);
|
|
11692
11672
|
}
|
|
11693
11673
|
super.update();
|
|
11694
11674
|
}
|
|
11675
|
+
calculateActivatedStatus(tc) {
|
|
11676
|
+
if ((0,helpers.isJoditObject)(this.j) && !this.j.editorIsActive) {
|
|
11677
|
+
return false;
|
|
11678
|
+
}
|
|
11679
|
+
if ((0,helpers.isFunction)(this.control.isActive) &&
|
|
11680
|
+
this.control.isActive(this.j, this.control, this)) {
|
|
11681
|
+
return true;
|
|
11682
|
+
}
|
|
11683
|
+
return Boolean(tc && tc.shouldBeActive(this));
|
|
11684
|
+
}
|
|
11685
|
+
calculateDisabledStatus(tc) {
|
|
11686
|
+
if (this.j.o.disabled) {
|
|
11687
|
+
return true;
|
|
11688
|
+
}
|
|
11689
|
+
if (this.j.o.readonly &&
|
|
11690
|
+
(!this.j.o.activeButtonsInReadOnly ||
|
|
11691
|
+
!this.j.o.activeButtonsInReadOnly.includes(this.control.name))) {
|
|
11692
|
+
return true;
|
|
11693
|
+
}
|
|
11694
|
+
if ((0,helpers.isFunction)(this.control.isDisabled) &&
|
|
11695
|
+
this.control.isDisabled(this.j, this.control, this)) {
|
|
11696
|
+
return true;
|
|
11697
|
+
}
|
|
11698
|
+
return Boolean(tc && tc.shouldBeDisabled(this));
|
|
11699
|
+
}
|
|
11695
11700
|
onChangeActivated() {
|
|
11696
11701
|
(0,helpers.attr)(this.button, 'aria-pressed', this.state.activated);
|
|
11697
11702
|
super.onChangeActivated();
|
|
@@ -13769,9 +13774,9 @@ const form_form = (editor, o) => {
|
|
|
13769
13774
|
const switcher = (label, ref, active = true) => `<div class="jodit-form__group">
|
|
13770
13775
|
<label>${i(label)}</label>
|
|
13771
13776
|
|
|
13772
|
-
<label class='
|
|
13777
|
+
<label class='jodit-switcher'>
|
|
13773
13778
|
<input ${act(active, 'checked')} data-ref="${ref}" type="checkbox"/>
|
|
13774
|
-
<span class="
|
|
13779
|
+
<span class="jodit-switcher__slider"></span>
|
|
13775
13780
|
</label>
|
|
13776
13781
|
</div>`;
|
|
13777
13782
|
return editor.create.fromHTML(`<form class="${jie} jodit-properties">
|