jodit 4.2.15 → 4.2.18

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 (107) hide show
  1. package/CHANGELOG.md +81 -5
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +408 -395
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.js +1 -1
  7. package/es2015/plugins/debug/debug.min.js +1 -1
  8. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.js +11 -11
  10. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  11. package/es2018/jodit.css +1 -1
  12. package/es2018/jodit.fat.min.js +2 -2
  13. package/es2018/jodit.js +408 -397
  14. package/es2018/jodit.min.js +2 -2
  15. package/es2018/plugins/debug/debug.js +1 -1
  16. package/es2018/plugins/debug/debug.min.js +1 -1
  17. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  18. package/es2018/plugins/speech-recognize/speech-recognize.js +11 -11
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  20. package/es2021/jodit.css +1 -1
  21. package/es2021/jodit.fat.min.js +2 -2
  22. package/es2021/jodit.js +408 -395
  23. package/es2021/jodit.min.js +2 -2
  24. package/es2021/plugins/debug/debug.js +1 -1
  25. package/es2021/plugins/debug/debug.min.js +1 -1
  26. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.js +11 -11
  28. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  29. package/es2021.en/jodit.css +1 -1
  30. package/es2021.en/jodit.fat.min.js +2 -2
  31. package/es2021.en/jodit.js +408 -395
  32. package/es2021.en/jodit.min.js +2 -2
  33. package/es2021.en/plugins/debug/debug.js +1 -1
  34. package/es2021.en/plugins/debug/debug.min.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.js +11 -11
  37. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  38. package/es5/jodit.css +2 -2
  39. package/es5/jodit.fat.min.js +2 -2
  40. package/es5/jodit.js +413 -400
  41. package/es5/jodit.min.css +2 -2
  42. package/es5/jodit.min.js +2 -2
  43. package/es5/plugins/debug/debug.js +1 -1
  44. package/es5/plugins/debug/debug.min.js +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.js +11 -11
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  48. package/esm/core/constants.js +1 -1
  49. package/esm/core/helpers/utils/append-script.js +2 -0
  50. package/esm/core/helpers/utils/config-proto.js +1 -1
  51. package/esm/core/request/ajax.js +1 -1
  52. package/esm/core/ui/helpers/get-control-type.js +15 -9
  53. package/esm/core/ui/helpers/get-strong-control-types.js +1 -1
  54. package/esm/jodit.d.ts +1 -1
  55. package/esm/jodit.js +1 -1
  56. package/esm/modules/file-browser/file-browser.js +1 -1
  57. package/esm/modules/history/history.js +1 -1
  58. package/esm/modules/image-editor/config.js +1 -1
  59. package/esm/modules/image-editor/image-editor.js +1 -1
  60. package/esm/modules/toolbar/button/button.js +2 -1
  61. package/esm/modules/toolbar/button/select/select.js +2 -1
  62. package/esm/modules/uploader/uploader.js +1 -1
  63. package/esm/plugins/about/about.js +1 -1
  64. package/esm/plugins/add-new-line/config.js +1 -1
  65. package/esm/plugins/ai-assistant/config.js +1 -1
  66. package/esm/plugins/backspace/cases/check-remove-char.js +4 -0
  67. package/esm/plugins/bold/bold.js +1 -1
  68. package/esm/plugins/class-span/class-span.js +1 -1
  69. package/esm/plugins/clean-html/config.js +1 -1
  70. package/esm/plugins/clipboard/config.js +1 -1
  71. package/esm/plugins/color/config.js +1 -1
  72. package/esm/plugins/copy-format/copy-format.js +1 -1
  73. package/esm/plugins/file/file.js +1 -1
  74. package/esm/plugins/font/config.js +1 -1
  75. package/esm/plugins/format-block/config.js +6 -4
  76. package/esm/plugins/fullsize/config.js +1 -1
  77. package/esm/plugins/hotkeys/config.d.ts +13 -0
  78. package/esm/plugins/hotkeys/config.js +0 -13
  79. package/esm/plugins/hr/hr.js +1 -1
  80. package/esm/plugins/image/image.js +1 -1
  81. package/esm/plugins/image-properties/config.d.ts +0 -3
  82. package/esm/plugins/image-properties/config.js +3 -0
  83. package/esm/plugins/image-properties/interface.d.ts +121 -0
  84. package/esm/plugins/indent/config.js +1 -1
  85. package/esm/plugins/inline-popup/config/config.js +1 -1
  86. package/esm/plugins/justify/justify.js +10 -6
  87. package/esm/plugins/line-height/config.js +1 -1
  88. package/esm/plugins/link/config.js +1 -1
  89. package/esm/plugins/mobile/config.js +1 -1
  90. package/esm/plugins/ordered-list/config.js +1 -1
  91. package/esm/plugins/paste/config.js +1 -1
  92. package/esm/plugins/print/print.js +1 -1
  93. package/esm/plugins/redo-undo/redo-undo.js +1 -1
  94. package/esm/plugins/search/config.js +1 -1
  95. package/esm/plugins/source/config.js +1 -1
  96. package/esm/plugins/speech-recognize/config.js +1 -1
  97. package/esm/plugins/spellcheck/config.js +1 -1
  98. package/esm/plugins/symbols/config.js +1 -1
  99. package/esm/plugins/table/config.js +1 -1
  100. package/esm/plugins/video/config.js +1 -1
  101. package/esm/types/toolbar.d.ts +1 -2
  102. package/package.json +1 -1
  103. package/types/jodit.d.ts +1 -1
  104. package/types/plugins/hotkeys/config.d.ts +13 -0
  105. package/types/plugins/image-properties/config.d.ts +0 -3
  106. package/types/plugins/image-properties/interface.d.ts +121 -0
  107. package/types/types/toolbar.d.ts +1 -2
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.15
4
+ * Version: v4.2.18
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.15
4
+ * Version: v4.2.18
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.15
4
+ * Version: v4.2.18
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.15
4
+ * Version: v4.2.18
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -25,11 +25,11 @@ return (self["webpackChunkjodit"] = self["webpackChunkjodit"] || []).push([[882]
25
25
  /* harmony import */ var jodit_core_helpers_checker_is_boolean__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9810);
26
26
  /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72197);
27
27
  /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(931);
28
- /* harmony import */ var _helpers_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71722);
29
- /* harmony import */ var _helpers_recognize_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93676);
30
- /* harmony import */ var _speech_recognize_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22227);
31
- /* harmony import */ var _speech_recognize_svg__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_speech_recognize_svg__WEBPACK_IMPORTED_MODULE_4__);
32
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36115);
28
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36115);
29
+ /* harmony import */ var _helpers_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71722);
30
+ /* harmony import */ var _helpers_recognize_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93676);
31
+ /* harmony import */ var _speech_recognize_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22227);
32
+ /* harmony import */ var _speech_recognize_svg__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_speech_recognize_svg__WEBPACK_IMPORTED_MODULE_5__);
33
33
  /*!
34
34
  * Jodit Editor (https://xdsoft.net/jodit/)
35
35
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -42,8 +42,8 @@ return (self["webpackChunkjodit"] = self["webpackChunkjodit"] || []).push([[882]
42
42
 
43
43
 
44
44
 
45
- jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.speechRecognize = {
46
- api: _helpers_api__WEBPACK_IMPORTED_MODULE_2__/* .SpeechRecognition */ .o,
45
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.speechRecognize = {
46
+ api: _helpers_api__WEBPACK_IMPORTED_MODULE_3__/* .SpeechRecognition */ .o,
47
47
  sound: true,
48
48
  continuous: true,
49
49
  interimResults: true,
@@ -61,8 +61,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.speechRecogn
61
61
  'select all': 'selectall'
62
62
  }
63
63
  };
64
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('speech-recognize', (_speech_recognize_svg__WEBPACK_IMPORTED_MODULE_4___default()));
65
- jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.speechRecognize = {
64
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('speech-recognize', (_speech_recognize_svg__WEBPACK_IMPORTED_MODULE_5___default()));
65
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.speechRecognize = {
66
66
  isActive: function (jodit, _) {
67
67
  var api = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, 'speech');
68
68
  return Boolean(api === null || api === void 0 ? void 0 : api.isEnabled);
@@ -80,7 +80,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.spe
80
80
  var api = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, 'speech');
81
81
  if (!api) {
82
82
  var nativeApi = new Api();
83
- api = new _helpers_recognize_manager__WEBPACK_IMPORTED_MODULE_3__/* .RecognizeManager */ .g(jodit.async, nativeApi);
83
+ api = new _helpers_recognize_manager__WEBPACK_IMPORTED_MODULE_4__/* .RecognizeManager */ .g(jodit.async, nativeApi);
84
84
  api.lang = lang;
85
85
  api.continuous = continuous;
86
86
  api.interimResults = interimResults;
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.15
4
+ * Version: v4.2.18
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
 
9
9
 
10
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096:function(e,t,n){"use strict";var i=n(9810),o=n(72197),s=n(931),r=n(71722),u=n(93676),c=n(22227),a=n.n(c),p=n(36115);p.T.prototype.speechRecognize={api:r.o,sound:!0,continuous:!0,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},s.I.set("speech-recognize",a()),p.T.prototype.controls.speechRecognize={isActive:function(e,t){var n=(0,o.m)(e,"speech");return Boolean(null==n?void 0:n.isEnabled)},isDisabled:function(e){return!e.o.speechRecognize.api},exec:function(e,t,n){var s=n.button,r=n.control,c=e.o.speechRecognize,a=c.api,p=c.lang,l=c.continuous,d=c.interimResults,h=c.sound;if(a){var f=(0,o.m)(e,"speech");if(!f){var m=new a;(f=new u.g(e.async,m)).lang=p,f.continuous=l,f.interimResults=d,f.sound=h,(0,o.m)(e,"speech",f),f.on("pulse",(function(e){s.setMod("pulse",e)})),f.on("result",(function(t){return e.e.fire("speechRecognizeResult",t)})),f.on("progress",(function(t){return e.e.fire("speechRecognizeProgressResult",t)})),s.hookStatus("beforeDestruct",(function(){f.destruct()}))}if(r.args){var g=r.args[0];if((0,i.L)(f[g]))return f[g]=!f[g],void(f.isEnabled&&f.restart())}f.toggle(),s.state.activated=f.isEnabled}else e.alert("Speech recognize API unsupported in your browser")},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate:function(e,t,n){var i,s=(0,o.m)(e,"speech"),r=null!==(i=null==s?void 0:s[t])&&void 0!==i?i:e.o.speechRecognize[t];return"<span class='jodit-speech-recognize__list-item'><input ".concat(r?"checked":""," class='jodit-checkbox' type='checkbox'>&nbsp;").concat(n,"</span>")},mods:{stroke:!1}}},81629:function(e,t,n){"use strict";n.d(t,{N:function(){return i},Z:function(){return o}});var i=440,o=940},71722:function(e,t,n){"use strict";n.d(t,{o:function(){return i}});var i=window.SpeechRecognition||window.webkitSpeechRecognition},50834:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var i=n(31635);function o(e,t){var n=(0,i.zs)(t.split("::"),2);e.execCommand(n[0],null,n[1])}},93676:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var i=n(31635),o=n(22664),s=n(43431),r=n(95473),u=n(81629),c=function(e){function t(t,i){var o=e.call(this)||this;return o.async=t,o._continuous=!1,o._interimResults=!1,o.sound=!0,o._isEnabled=!1,o._restartTimeout=0,o._onSpeechStart=function(e){o._isEnabled&&(o.async.clearTimeout(o._restartTimeout),o._restartTimeout=o.async.setTimeout((function(){o.restart(),o.emit("pulse",!1),o._makeSound(u.Z)}),5e3),o.emit("pulse",!0))},o._progressTimeout=0,o._api=i,n._instances.add(o),o}var n;return(0,i.C6)(t,e),n=t,Object.defineProperty(t.prototype,"lang",{get:function(){return this._lang},set:function(e){this._lang=e,this._api.lang=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"continuous",{get:function(){return this._continuous},set:function(e){this._continuous=e,this._api.continuous=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"interimResults",{get:function(){return this._interimResults},set:function(e){this._interimResults=e,this._api.interimResults=e},enumerable:!1,configurable:!0}),t.prototype.destruct=function(){this.stop(),n._instances.delete(this),e.prototype.destruct.call(this)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),t.prototype.start=function(){var e=this;this._isEnabled||(this._isEnabled=!0,n._instances.forEach((function(t){t!==e&&t.stop()})),this._api.start(),this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onResult))},t.prototype.stop=function(){if(this._isEnabled){try{this._api.abort(),this._api.stop()}catch(e){}this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onResult),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1)}},t.prototype.toggle=function(){this._isEnabled?this.stop():this.start()},t.prototype.restart=function(){this.stop(),this.start()},t.prototype.__on=function(e,t){return this._api.addEventListener(e,t),this},t.prototype.__off=function(e,t){return this._api.removeEventListener(e,t),this},t.prototype._onResult=function(e){var t=this;if(this._isEnabled){this.async.clearTimeout(this._progressTimeout);var n=e.results.item(e.resultIndex),i=n.item(0).transcript,o=function(){try{t.async.clearTimeout(t._restartTimeout),t.emit("result",i)}catch(e){}t.restart(),t.emit("pulse",!1),t._makeSound(u.N)};if(!1===n.isFinal)return this.emit("progress",i),void(this._progressTimeout=this.async.setTimeout(o,500));o()}},t.prototype._onError=function(){this._isEnabled&&(this._makeSound(u.Z),this.emit("pulse",!1),this.restart())},t.prototype._makeSound=function(e){this.sound&&(0,r.s)({frequency:e})},t._instances=new Set,n=(0,i.Cg)([o.autobind],t)}(s.h)},95473:function(e,t,n){"use strict";n.d(t,{s:function(){return o}});var i=n(81629);function o(e){var t=void 0===e?{}:e,n=t.sec,o=void 0===n?.1:n,s=t.frequency,r=void 0===s?i.N:s,u=t.gain,c=void 0===u?.1:u,a=t.type,p=void 0===a?"sine":a;if(void 0!==window.AudioContext||void 0!==window.webkitAudioContext){var l=new(window.AudioContext||window.webkitAudioContext),d=l.createGain(),h=l.createOscillator();h.type=p,h.frequency.value=r,h.connect(d),d.connect(l.destination),h.start(),h.stop(l.currentTime+o),d.gain.value=c}}},61593:function(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},64458:function(e){"use strict";e.exports={newline:"řádek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpoznání Řeči",Sound:"Zvuk","Interim Results":"Průběžné Výsledky"}},89601:function(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},87710:function(e){"use strict";e.exports={newline:"nueva línea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},15603:function(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},84059:function(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},13958:function(e){"use strict";e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"Résultats Intermédiaires"}},18717:function(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},14765:function(e){"use strict";e.exports={newline:"újsor",delete:"törlés",space:"tér","Speech Recognize":"A Beszéd Felismeri",Sound:"Hang","Interim Results":"Időközi Eredmények"}},77995:function(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},25202:function(e,t,n){"use strict";n.r(t),n.d(t,{ar:function(){return i},cs_cz:function(){return o},de:function(){return s},es:function(){return r},fa:function(){return u},fi:function(){return c},fr:function(){return a},he:function(){return p},hu:function(){return l},id:function(){return d},it:function(){return h},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return R},pl:function(){return _},pt_br:function(){return S},ru:function(){return v},tr:function(){return w},zh_cn:function(){return z},zh_tw:function(){return y}});var i=n(61593),o=n(64458),s=n(89601),r=n(87710),u=n(15603),c=n(84059),a=n(13958),p=n(18717),l=n(14765),d=n(77995),h=n(92315),f=n(54711),m=n(68632),g=n(76769),R=n(3424),_=n(85454),S=n(64149),v=n(16491),w=n(48948),z=n(84370),y=n(56646)},92315:function(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},54711:function(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},68632:function(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},76769:function(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},3424:function(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},85454:function(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},64149:function(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},16491:function(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},48948:function(e){"use strict";e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonuçlar"}},84370:function(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},56646:function(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},37873:function(e,t,n){"use strict";n.r(t),n.d(t,{SpeechRecognizeNative:function(){return h}});var i=n(31635),o=n(37075),s=n(66927),r=n(55186),u=n(56298),c=n(84976),a=n(71005),p=(n(71096),n(46173)),l=n(50834),d=n(25202),h=function(e){function t(t){var n=e.call(this,t)||this;return n._commandToWord={},t.o.speechRecognize.api&&t.registerButton({group:"state",name:"speechRecognize"}),n}return(0,i.C6)(t,e),t.prototype.afterInit=function(e){var t=this,n=e.o.speechRecognize.commands;n&&((0,u.JW)(d),(0,c.HP)(n,!1).forEach((function(i){i.split("|").forEach((function(o){o=o.trim().toLowerCase(),t._commandToWord[o]=n[i];var s=e.i18n(o);s!==o&&s.split("|").forEach((function(e){t._commandToWord[e.trim().toLowerCase()]=n[i].trim()}))}))})))},t.prototype.beforeDestruct=function(e){},t.prototype.onSpeechRecognizeProgressResult=function(e){var t=this;this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.setTimeout((function(){r.J.safeRemove(t.messagePopup)}),{label:"onSpeechRecognizeProgressResult",timeout:1e3}),this.messagePopup.innerText=e+"|"},t.prototype.onSpeechRecognizeResult=function(e){var t=this.j,n=t.s;if(r.J.safeRemove(this.messagePopup),!this._checkCommand(e)){var i=n.range,o=n.current();if(n.isCollapsed()&&r.J.isText(o)&&r.J.isOrContains(t.editor,o)&&o.nodeValue){var s=o.nodeValue;o.nodeValue=s+(/[\u00A0 ]\uFEFF*$/.test(s)?"":" ")+e,i.setStartAfter(o),n.selectRange(i),t.synchronizeValues()}else n.insertHTML(e)}},t.prototype._checkCommand=function(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,l.F)(this.j,this._commandToWord[e]),!0)},(0,i.Cg)([(0,s.w)(":speechRecognizeProgressResult"),(0,o.s)()],t.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,s.w)(":speechRecognizeResult")],t.prototype,"onSpeechRecognizeResult",null),t}(a.k);p.x.plugins.add("speech-recognize",h)},22227:function(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'}},function(e){return e(e.s=37873)}])}));
10
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096:function(e,t,n){"use strict";var i=n(9810),o=n(72197),s=n(931),r=n(36115),u=n(71722),c=n(93676),a=n(22227),p=n.n(a);r.T.prototype.speechRecognize={api:u.o,sound:!0,continuous:!0,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},s.I.set("speech-recognize",p()),r.T.prototype.controls.speechRecognize={isActive:function(e,t){var n=(0,o.m)(e,"speech");return Boolean(null==n?void 0:n.isEnabled)},isDisabled:function(e){return!e.o.speechRecognize.api},exec:function(e,t,n){var s=n.button,r=n.control,u=e.o.speechRecognize,a=u.api,p=u.lang,l=u.continuous,d=u.interimResults,h=u.sound;if(a){var f=(0,o.m)(e,"speech");if(!f){var m=new a;(f=new c.g(e.async,m)).lang=p,f.continuous=l,f.interimResults=d,f.sound=h,(0,o.m)(e,"speech",f),f.on("pulse",(function(e){s.setMod("pulse",e)})),f.on("result",(function(t){return e.e.fire("speechRecognizeResult",t)})),f.on("progress",(function(t){return e.e.fire("speechRecognizeProgressResult",t)})),s.hookStatus("beforeDestruct",(function(){f.destruct()}))}if(r.args){var g=r.args[0];if((0,i.L)(f[g]))return f[g]=!f[g],void(f.isEnabled&&f.restart())}f.toggle(),s.state.activated=f.isEnabled}else e.alert("Speech recognize API unsupported in your browser")},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate:function(e,t,n){var i,s=(0,o.m)(e,"speech"),r=null!==(i=null==s?void 0:s[t])&&void 0!==i?i:e.o.speechRecognize[t];return"<span class='jodit-speech-recognize__list-item'><input ".concat(r?"checked":""," class='jodit-checkbox' type='checkbox'>&nbsp;").concat(n,"</span>")},mods:{stroke:!1}}},81629:function(e,t,n){"use strict";n.d(t,{N:function(){return i},Z:function(){return o}});var i=440,o=940},71722:function(e,t,n){"use strict";n.d(t,{o:function(){return i}});var i=window.SpeechRecognition||window.webkitSpeechRecognition},50834:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var i=n(31635);function o(e,t){var n=(0,i.zs)(t.split("::"),2);e.execCommand(n[0],null,n[1])}},93676:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var i=n(31635),o=n(22664),s=n(43431),r=n(95473),u=n(81629),c=function(e){function t(t,i){var o=e.call(this)||this;return o.async=t,o._continuous=!1,o._interimResults=!1,o.sound=!0,o._isEnabled=!1,o._restartTimeout=0,o._onSpeechStart=function(e){o._isEnabled&&(o.async.clearTimeout(o._restartTimeout),o._restartTimeout=o.async.setTimeout((function(){o.restart(),o.emit("pulse",!1),o._makeSound(u.Z)}),5e3),o.emit("pulse",!0))},o._progressTimeout=0,o._api=i,n._instances.add(o),o}var n;return(0,i.C6)(t,e),n=t,Object.defineProperty(t.prototype,"lang",{get:function(){return this._lang},set:function(e){this._lang=e,this._api.lang=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"continuous",{get:function(){return this._continuous},set:function(e){this._continuous=e,this._api.continuous=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"interimResults",{get:function(){return this._interimResults},set:function(e){this._interimResults=e,this._api.interimResults=e},enumerable:!1,configurable:!0}),t.prototype.destruct=function(){this.stop(),n._instances.delete(this),e.prototype.destruct.call(this)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),t.prototype.start=function(){var e=this;this._isEnabled||(this._isEnabled=!0,n._instances.forEach((function(t){t!==e&&t.stop()})),this._api.start(),this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onResult))},t.prototype.stop=function(){if(this._isEnabled){try{this._api.abort(),this._api.stop()}catch(e){}this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onResult),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1)}},t.prototype.toggle=function(){this._isEnabled?this.stop():this.start()},t.prototype.restart=function(){this.stop(),this.start()},t.prototype.__on=function(e,t){return this._api.addEventListener(e,t),this},t.prototype.__off=function(e,t){return this._api.removeEventListener(e,t),this},t.prototype._onResult=function(e){var t=this;if(this._isEnabled){this.async.clearTimeout(this._progressTimeout);var n=e.results.item(e.resultIndex),i=n.item(0).transcript,o=function(){try{t.async.clearTimeout(t._restartTimeout),t.emit("result",i)}catch(e){}t.restart(),t.emit("pulse",!1),t._makeSound(u.N)};if(!1===n.isFinal)return this.emit("progress",i),void(this._progressTimeout=this.async.setTimeout(o,500));o()}},t.prototype._onError=function(){this._isEnabled&&(this._makeSound(u.Z),this.emit("pulse",!1),this.restart())},t.prototype._makeSound=function(e){this.sound&&(0,r.s)({frequency:e})},t._instances=new Set,n=(0,i.Cg)([o.autobind],t)}(s.h)},95473:function(e,t,n){"use strict";n.d(t,{s:function(){return o}});var i=n(81629);function o(e){var t=void 0===e?{}:e,n=t.sec,o=void 0===n?.1:n,s=t.frequency,r=void 0===s?i.N:s,u=t.gain,c=void 0===u?.1:u,a=t.type,p=void 0===a?"sine":a;if(void 0!==window.AudioContext||void 0!==window.webkitAudioContext){var l=new(window.AudioContext||window.webkitAudioContext),d=l.createGain(),h=l.createOscillator();h.type=p,h.frequency.value=r,h.connect(d),d.connect(l.destination),h.start(),h.stop(l.currentTime+o),d.gain.value=c}}},61593:function(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},64458:function(e){"use strict";e.exports={newline:"řádek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpoznání Řeči",Sound:"Zvuk","Interim Results":"Průběžné Výsledky"}},89601:function(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},87710:function(e){"use strict";e.exports={newline:"nueva línea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},15603:function(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},84059:function(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},13958:function(e){"use strict";e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"Résultats Intermédiaires"}},18717:function(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},14765:function(e){"use strict";e.exports={newline:"újsor",delete:"törlés",space:"tér","Speech Recognize":"A Beszéd Felismeri",Sound:"Hang","Interim Results":"Időközi Eredmények"}},77995:function(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},25202:function(e,t,n){"use strict";n.r(t),n.d(t,{ar:function(){return i},cs_cz:function(){return o},de:function(){return s},es:function(){return r},fa:function(){return u},fi:function(){return c},fr:function(){return a},he:function(){return p},hu:function(){return l},id:function(){return d},it:function(){return h},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return R},pl:function(){return _},pt_br:function(){return S},ru:function(){return v},tr:function(){return w},zh_cn:function(){return z},zh_tw:function(){return y}});var i=n(61593),o=n(64458),s=n(89601),r=n(87710),u=n(15603),c=n(84059),a=n(13958),p=n(18717),l=n(14765),d=n(77995),h=n(92315),f=n(54711),m=n(68632),g=n(76769),R=n(3424),_=n(85454),S=n(64149),v=n(16491),w=n(48948),z=n(84370),y=n(56646)},92315:function(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},54711:function(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},68632:function(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},76769:function(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},3424:function(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},85454:function(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},64149:function(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},16491:function(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},48948:function(e){"use strict";e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonuçlar"}},84370:function(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},56646:function(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},37873:function(e,t,n){"use strict";n.r(t),n.d(t,{SpeechRecognizeNative:function(){return h}});var i=n(31635),o=n(37075),s=n(66927),r=n(55186),u=n(56298),c=n(84976),a=n(71005),p=(n(71096),n(46173)),l=n(50834),d=n(25202),h=function(e){function t(t){var n=e.call(this,t)||this;return n._commandToWord={},t.o.speechRecognize.api&&t.registerButton({group:"state",name:"speechRecognize"}),n}return(0,i.C6)(t,e),t.prototype.afterInit=function(e){var t=this,n=e.o.speechRecognize.commands;n&&((0,u.JW)(d),(0,c.HP)(n,!1).forEach((function(i){i.split("|").forEach((function(o){o=o.trim().toLowerCase(),t._commandToWord[o]=n[i];var s=e.i18n(o);s!==o&&s.split("|").forEach((function(e){t._commandToWord[e.trim().toLowerCase()]=n[i].trim()}))}))})))},t.prototype.beforeDestruct=function(e){},t.prototype.onSpeechRecognizeProgressResult=function(e){var t=this;this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.setTimeout((function(){r.J.safeRemove(t.messagePopup)}),{label:"onSpeechRecognizeProgressResult",timeout:1e3}),this.messagePopup.innerText=e+"|"},t.prototype.onSpeechRecognizeResult=function(e){var t=this.j,n=t.s;if(r.J.safeRemove(this.messagePopup),!this._checkCommand(e)){var i=n.range,o=n.current();if(n.isCollapsed()&&r.J.isText(o)&&r.J.isOrContains(t.editor,o)&&o.nodeValue){var s=o.nodeValue;o.nodeValue=s+(/[\u00A0 ]\uFEFF*$/.test(s)?"":" ")+e,i.setStartAfter(o),n.selectRange(i),t.synchronizeValues()}else n.insertHTML(e)}},t.prototype._checkCommand=function(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,l.F)(this.j,this._commandToWord[e]),!0)},(0,i.Cg)([(0,s.w)(":speechRecognizeProgressResult"),(0,o.s)()],t.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,s.w)(":speechRecognizeResult")],t.prototype,"onSpeechRecognizeResult",null),t}(a.k);p.x.plugins.add("speech-recognize",h)},22227:function(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'}},function(e){return e(e.s=37873)}])}));
@@ -3,7 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- export const APP_VERSION = "4.2.15";
6
+ export const APP_VERSION = "4.2.18";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -26,6 +26,8 @@ export const appendScriptAsync = cacheLoaders((jodit, url) => {
26
26
  }
27
27
  const script = jodit.c.element('script', {
28
28
  type: 'text/javascript',
29
+ crossorigin: 'anonymous',
30
+ referrerpolicy: 'no-referrer',
29
31
  async: true,
30
32
  src: completeUrl(url)
31
33
  });
@@ -7,9 +7,9 @@ import { isArray } from "../checker/is-array.js";
7
7
  import { isPlainObject } from "../checker/is-plain-object.js";
8
8
  import { isString } from "../checker/is-string.js";
9
9
  import { isVoid } from "../checker/is-void.js";
10
+ import { Config } from "../../../config.js";
10
11
  import { isAtom } from "./extend.js";
11
12
  import { keys } from "./utils.js";
12
- import { Config } from "../../../config.js";
13
13
  /**
14
14
  * @example
15
15
  * ```js
@@ -17,9 +17,9 @@ import { Async } from "../async/index.js";
17
17
  import { autobind } from "../decorators/autobind/autobind.js";
18
18
  import { buildQuery, ConfigProto, isFunction, isPlainObject, isString, parseQuery } from "../helpers/index.js";
19
19
  import * as error from "../helpers/utils/error/index.js";
20
+ import { Config } from "../../config.js";
20
21
  import "./config.js";
21
22
  import { Response } from "./response.js";
22
- import { Config } from "../../config.js";
23
23
  export class Ajax {
24
24
  className() {
25
25
  return 'Ajax';
@@ -3,7 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- import { ConfigFlatten, isArray, isString } from "../../helpers/index.js";
6
+ import { ConfigFlatten, /*isArray,*/ isString } from "../../helpers/index.js";
7
7
  import { Config } from "../../../config.js";
8
8
  /**
9
9
  * Get control for button name
@@ -47,17 +47,23 @@ export function findControlType(path, controls) {
47
47
  else {
48
48
  key = namespaceOrKey;
49
49
  }
50
- const list = store[key]?.list;
50
+ // const list = store[key]?.list;
51
51
  return store[key]
52
52
  ? {
53
53
  name: key,
54
- ...ConfigFlatten(store[key]),
55
- list: isArray(list)
56
- ? list.reduce((acc, k) => {
57
- acc[k] = k;
58
- return acc;
59
- }, {})
60
- : list
54
+ ...ConfigFlatten(store[key])
55
+ // list: isArray(list)
56
+ // ? (<Array<string>>list).reduce(
57
+ // (
58
+ // acc: IDictionary<string | number>,
59
+ // k: string | number
60
+ // ) => {
61
+ // acc[String(k)] = k;
62
+ // return acc;
63
+ // },
64
+ // {}
65
+ // )
66
+ // : list
61
67
  }
62
68
  : undefined;
63
69
  }
@@ -5,8 +5,8 @@
5
5
  */
6
6
  import { isArray } from "../../helpers/checker/is-array.js";
7
7
  import { ConfigProto, keys } from "../../helpers/utils/index.js";
8
- import { getControlType } from "./get-control-type.js";
9
8
  import { Config } from "../../../config.js";
9
+ import { getControlType } from "./get-control-type.js";
10
10
  /**
11
11
  * @private
12
12
  */
package/esm/jodit.d.ts CHANGED
@@ -12,8 +12,8 @@ import type { AjaxOptions, CanPromise, CustomCommand, ICreate, IDictionary, IFil
12
12
  import type * as Modules from "./modules";
13
13
  import * as constants from "./core/constants";
14
14
  import { Dlgs } from "./core/traits/dlgs";
15
- import { Selection, ViewWithToolbar } from "./modules";
16
15
  import { Config } from "./config";
16
+ import { Selection, ViewWithToolbar } from "./modules";
17
17
  /**
18
18
  * Class Jodit. Main class
19
19
  */
package/esm/jodit.js CHANGED
@@ -21,8 +21,8 @@ import { eventEmitter, instances, modules, pluginSystem } from "./core/global.js
21
21
  import { asArray, attr, callPromise, ConfigProto, css, error, isFunction, isJoditObject, isNumber, isPromise, isString, isVoid, kebabCase, markAsAtomic, normalizeKeyAliases, resolveElement, toArray, ucfirst } from "./core/helpers/index.js";
22
22
  import { Ajax } from "./core/request/index.js";
23
23
  import { Dlgs } from "./core/traits/dlgs.js";
24
- import { Create, Dom, History, Plugin, Selection, StatusBar, STATUSES, ViewWithToolbar } from "./modules/index.js";
25
24
  import { Config } from "./config.js";
25
+ import { Create, Dom, History, Plugin, Selection, StatusBar, STATUSES, ViewWithToolbar } from "./modules/index.js";
26
26
  const __defaultStyleDisplayKey = 'data-jodit-default-style-display';
27
27
  const __defaultClassesKey = 'data-jodit-default-classes';
28
28
  let Jodit = Jodit_1 = class Jodit extends ViewWithToolbar {
@@ -23,6 +23,7 @@ import { ConfigProto, error, isAbortError, isFunction, isString, trim } from "..
23
23
  import { Storage } from "../../core/storage/index.js";
24
24
  import { Dlgs } from "../../core/traits/dlgs.js";
25
25
  import { ViewWithToolbar } from "../../core/view/view-with-toolbar.js";
26
+ import { Config } from "../../config.js";
26
27
  import "./config.js";
27
28
  import { loadItems } from "./fetch/load-items.js";
28
29
  import { loadTree } from "./fetch/load-tree.js";
@@ -32,7 +33,6 @@ import { stateListeners } from "./listeners/state-listeners.js";
32
33
  import { DEFAULT_SOURCE_NAME } from "./data-provider.js";
33
34
  import { makeDataProvider } from "./factories.js";
34
35
  import { FileBrowserFiles, FileBrowserTree } from "./ui/index.js";
35
- import { Config } from "../../config.js";
36
36
  let FileBrowser = class FileBrowser extends ViewWithToolbar {
37
37
  /** @override */
38
38
  className() {
@@ -15,10 +15,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
15
15
  };
16
16
  import { ViewComponent } from "../../core/component/index.js";
17
17
  import { debounce } from "../../core/decorators/index.js";
18
+ import { Config } from "../../config.js";
18
19
  import { Command } from "./command.js";
19
20
  import { Snapshot } from "./snapshot.js";
20
21
  import { Stack } from "./stack.js";
21
- import { Config } from "../../config.js";
22
22
  Config.prototype.history = {
23
23
  enable: true,
24
24
  maxHistoryLength: Infinity,
@@ -4,9 +4,9 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import { Icon } from "../../core/ui/icon.js";
7
+ import { Config } from "../../config.js";
7
8
  import cropIcon from "./icons/crop.svg.js";
8
9
  import resizeIcon from "./icons/resize.svg.js";
9
- import { Config } from "../../config.js";
10
10
  Config.prototype.imageeditor = {
11
11
  min_width: 20,
12
12
  min_height: 20,
@@ -19,9 +19,9 @@ import { autobind, component, debounce, throttle } from "../../core/decorators/i
19
19
  import { Dom } from "../../core/dom/index.js";
20
20
  import { $$, attr, call, css, refs, toArray, trim } from "../../core/helpers/index.js";
21
21
  import { Button } from "../../core/ui/button/index.js";
22
+ import { Config } from "../../config.js";
22
23
  import "./config.js";
23
24
  import { form } from "./templates/form.js";
24
- import { Config } from "../../config.js";
25
25
  const jie = 'jodit-image-editor';
26
26
  const TABS = {
27
27
  resize: 'resize',
@@ -98,7 +98,8 @@ let ToolbarButton = class ToolbarButton extends UIButton {
98
98
  }
99
99
  createContainer() {
100
100
  const cn = this.componentName;
101
- const container = this.j.c.span(cn), button = super.createContainer();
101
+ const container = this.j.c.span(cn);
102
+ const button = super.createContainer();
102
103
  attr(container, 'role', 'listitem');
103
104
  button.classList.remove(cn);
104
105
  button.classList.add(cn + '__button');
@@ -14,6 +14,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
14
14
  return c > 3 && r && Object.defineProperty(target, key, r), r;
15
15
  };
16
16
  import { component } from "../../../../core/decorators/index.js";
17
+ import { isPlainObject } from "../../../../core/helpers/checker/is-plain-object.js";
17
18
  import { isString } from "../../../../core/helpers/checker/is-string.js";
18
19
  import { ToolbarButton } from "../button.js";
19
20
  let ToolbarSelect = class ToolbarSelect extends ToolbarButton {
@@ -33,7 +34,7 @@ let ToolbarSelect = class ToolbarSelect extends ToolbarButton {
33
34
  const keys = Object.keys(list);
34
35
  key = keys[0];
35
36
  }
36
- const text = (list[key.toString()] || key).toString();
37
+ const text = (isPlainObject(list) ? list[key.toString()] || key : key).toString();
37
38
  this.state.text =
38
39
  this.control.textTemplate?.(this.jodit, text) ?? text;
39
40
  }
@@ -6,9 +6,9 @@
6
6
  import { STATUSES, ViewComponent } from "../../core/component/index.js";
7
7
  import { IS_ES_NEXT, IS_IE } from "../../core/constants.js";
8
8
  import { ConfigProto, error, isFunction, isJoditObject } from "../../core/helpers/index.js";
9
+ import { Config } from "../../config.js";
9
10
  import { ajaxInstances, hasFiles, hasItems, processOldBrowserDrag, send, sendFiles } from "./helpers/index.js";
10
11
  import "./config.js";
11
- import { Config } from "../../config.js";
12
12
  export class Uploader extends ViewComponent {
13
13
  get j() {
14
14
  return this.jodit;
@@ -8,8 +8,8 @@ import { HOMEPAGE } from "../../core/constants.js";
8
8
  import { pluginSystem } from "../../core/global.js";
9
9
  import { css, isLicense, normalizeLicense } from "../../core/helpers/index.js";
10
10
  import { Icon } from "../../core/ui/icon.js";
11
- import aboutIcon from "./about.svg.js";
12
11
  import { Config } from "../../config.js";
12
+ import aboutIcon from "./about.svg.js";
13
13
  Config.prototype.controls.about = {
14
14
  exec: (editor) => {
15
15
  const dialog = editor.dlg({ closeOnClickOverlay: true }), i = editor.i18n.bind(editor);
@@ -4,8 +4,8 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import { Icon } from "../../core/ui/icon.js";
7
- import enterIcon from "./enter.svg.js";
8
7
  import { Config } from "../../config.js";
8
+ import enterIcon from "./enter.svg.js";
9
9
  Config.prototype.addNewLine = true;
10
10
  Config.prototype.addNewLineOnDBLClick = true;
11
11
  Config.prototype.addNewLineTagsTriggers = [
@@ -4,9 +4,9 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import { Icon } from "../../core/ui/icon.js";
7
+ import { Config } from "../../config.js";
7
8
  import magicWandIcon from "./ai-assistant.svg.js";
8
9
  import chatBotIcon from "./chat-bot.svg.js";
9
- import { Config } from "../../config.js";
10
10
  const aiAssistantDefaults = {
11
11
  aiCommonPrefixPrompt: '',
12
12
  aiCommonSuffixPrompt: '',
@@ -39,6 +39,10 @@ export function checkRemoveChar(jodit, fakeNode, backspace, mode) {
39
39
  }
40
40
  if (sibling.nodeValue?.length) {
41
41
  removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
42
+ if (!sibling.nodeValue.length &&
43
+ Dom.isInlineBlock(sibling.parentNode)) {
44
+ sibling.nodeValue = INVISIBLE_SPACE;
45
+ }
42
46
  }
43
47
  if (!sibling.nodeValue?.length) {
44
48
  removeNeighbor = sibling;
@@ -6,6 +6,7 @@
6
6
  import { pluginSystem } from "../../core/global.js";
7
7
  import { isArray } from "../../core/helpers/index.js";
8
8
  import { Icon } from "../../core/ui/icon.js";
9
+ import { Config } from "../../config.js";
9
10
  import "./interface.js";
10
11
  import "./config.js";
11
12
  import boldIcon from "./icons/bold.svg.js";
@@ -14,7 +15,6 @@ import strikethroughIcon from "./icons/strikethrough.svg.js";
14
15
  import subscriptIcon from "./icons/subscript.svg.js";
15
16
  import superscriptIcon from "./icons/superscript.svg.js";
16
17
  import underlineIcon from "./icons/underline.svg.js";
17
- import { Config } from "../../config.js";
18
18
  /**
19
19
  * Adds `bold`,` strikethrough`, `underline` and` italic` buttons to Jodit
20
20
  */
@@ -8,8 +8,8 @@ import { pluginSystem } from "../../core/global.js";
8
8
  import { memorizeExec } from "../../core/helpers/utils/utils.js";
9
9
  import { Plugin } from "../../core/plugin/index.js";
10
10
  import { Icon } from "../../core/ui/icon.js";
11
- import classSpanIcon from "./class-span.svg.js";
12
11
  import { Config } from "../../config.js";
12
+ import classSpanIcon from "./class-span.svg.js";
13
13
  Config.prototype.controls.classSpan = {
14
14
  command: 'applyClassName',
15
15
  exec: memorizeExec,
@@ -4,8 +4,8 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import { Icon } from "../../core/ui/icon.js";
7
- import eraserIcon from "./eraser.svg.js";
8
7
  import { Config } from "../../config.js";
8
+ import eraserIcon from "./eraser.svg.js";
9
9
  Config.prototype.cleanHTML = {
10
10
  timeout: 300,
11
11
  removeEmptyElements: true,
@@ -4,11 +4,11 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import { Icon } from "../../core/ui/icon.js";
7
+ import { Config } from "../../config.js";
7
8
  import copyIcon from "./icons/copy.svg.js";
8
9
  import cutIcon from "./icons/cut.svg.js";
9
10
  import pasteIcon from "./icons/paste.svg.js";
10
11
  import selectAllIcon from "./icons/select-all.svg.js";
11
- import { Config } from "../../config.js";
12
12
  Config.prototype.controls.cut = {
13
13
  command: 'cut',
14
14
  isDisabled: (editor) => editor.s.isCollapsed(),
@@ -6,9 +6,9 @@
6
6
  import { Dom } from "../../core/dom/dom.js";
7
7
  import { css, dataBind, isJoditObject } from "../../core/helpers/index.js";
8
8
  import { Icon } from "../../core/ui/icon.js";
9
+ import { Config } from "../../config.js";
9
10
  import { ColorPickerWidget, TabsWidget } from "../../modules/widget/index.js";
10
11
  import brushIcon from "./brush.svg.js";
11
- import { Config } from "../../config.js";
12
12
  Icon.set('brush', brushIcon);
13
13
  Config.prototype.controls.brushCell = {
14
14
  isVisible: (editor) => {
@@ -7,9 +7,9 @@ import { Dom } from "../../core/dom/dom.js";
7
7
  import { extendLang, pluginSystem } from "../../core/global.js";
8
8
  import { css } from "../../core/helpers/utils/css.js";
9
9
  import { Icon } from "../../core/ui/icon.js";
10
+ import { Config } from "../../config.js";
10
11
  import copyFormatIcon from "./copy-format.svg.js";
11
12
  import * as langs from "./langs/index.js";
12
- import { Config } from "../../config.js";
13
13
  const pluginKey = 'copy-format';
14
14
  /**
15
15
  * Plug-in copy and paste formatting from one element to another
@@ -5,8 +5,8 @@
5
5
  */
6
6
  import { Dom } from "../../core/dom/dom.js";
7
7
  import { pluginSystem } from "../../core/global.js";
8
- import { FileSelectorWidget } from "../../modules/widget/index.js";
9
8
  import { Config } from "../../config.js";
9
+ import { FileSelectorWidget } from "../../modules/widget/index.js";
10
10
  Config.prototype.controls.file = {
11
11
  popup: (editor, current, close) => {
12
12
  const insert = (url, title = '') => {
@@ -7,9 +7,9 @@ import { Dom } from "../../core/dom/index.js";
7
7
  import { trimChars } from "../../core/helpers/string/trim.js";
8
8
  import { css } from "../../core/helpers/utils/css.js";
9
9
  import { Icon } from "../../core/ui/icon.js";
10
+ import { Config } from "../../config.js";
10
11
  import fontIcon from "./icons/font.svg.js";
11
12
  import fontsizeIcon from "./icons/fontsize.svg.js";
12
- import { Config } from "../../config.js";
13
13
  /**
14
14
  * Default font-size points
15
15
  */
@@ -3,10 +3,11 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- import { Dom } from "../../core/dom/index.js";
6
+ import { Dom } from "../../core/dom/dom.js";
7
+ import { isPlainObject } from "../../core/helpers/checker/is-plain-object.js";
7
8
  import { Icon } from "../../core/ui/icon.js";
8
- import paragraphIcon from "./paragraph.svg.js";
9
9
  import { Config } from "../../config.js";
10
+ import paragraphIcon from "./paragraph.svg.js";
10
11
  Icon.set('paragraph', paragraphIcon);
11
12
  Config.prototype.controls.paragraph = {
12
13
  command: 'formatBlock',
@@ -21,7 +22,7 @@ Config.prototype.controls.paragraph = {
21
22
  return false;
22
23
  }
23
24
  const currentValue = button.state.value, list = control.list;
24
- if (list && list[currentValue.toString()]) {
25
+ if (isPlainObject(list) && list[currentValue.toString()]) {
25
26
  if (editor.o.textIcons) {
26
27
  button.state.text = list[currentValue.toString()].toString();
27
28
  }
@@ -45,7 +46,8 @@ Config.prototype.controls.paragraph = {
45
46
  },
46
47
  isActive: (editor, button) => {
47
48
  return (button.state.value !== editor.o.enter &&
48
- Boolean(button.control.list?.[button.state.value]));
49
+ isPlainObject(button.control.list) &&
50
+ Boolean(button.control.list[button.state.value]));
49
51
  },
50
52
  childTemplate: (e, key, value) => `<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
51
53
  tooltip: 'Insert format block'
@@ -5,9 +5,9 @@
5
5
  */
6
6
  import * as consts from "../../core/constants.js";
7
7
  import { Icon } from "../../core/ui/icon.js";
8
+ import { Config } from "../../config.js";
8
9
  import fullsizeIcon from "./icons/fullsize.svg.js";
9
10
  import shrinkIcon from "./icons/shrink.svg.js";
10
- import { Config } from "../../config.js";
11
11
  Config.prototype.fullsize = false;
12
12
  Config.prototype.globalFullSize = true;
13
13
  Icon.set('fullsize', fullsizeIcon).set('shrink', shrinkIcon);
@@ -9,6 +9,19 @@
9
9
  import type { IDictionary } from "../../types";
10
10
  declare module 'jodit/config' {
11
11
  interface Config {
12
+ /**
13
+ * You can redefine hotkeys for some command
14
+ *
15
+ * @example
16
+ * ```js
17
+ * const jodit = Jodit.make('#editor', {
18
+ * commandToHotkeys: {
19
+ * bold: 'ctrl+shift+b',
20
+ * italic: ['ctrl+i', 'ctrl+b'],
21
+ * }
22
+ * })
23
+ * ```
24
+ */
12
25
  commandToHotkeys: IDictionary<string | string[]>;
13
26
  }
14
27
  }
@@ -4,19 +4,6 @@
4
4
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
  import { Config } from "../../config.js";
7
- /**
8
- * You can redefine hotkeys for some command
9
- *
10
- * @example
11
- * ```js
12
- * var jodit = Jodit.make('#editor', {
13
- * commandToHotkeys: {
14
- * bold: 'ctrl+shift+b',
15
- * italic: ['ctrl+i', 'ctrl+b'],
16
- * }
17
- * })
18
- * ```
19
- */
20
7
  Config.prototype.commandToHotkeys = {
21
8
  removeFormat: ['ctrl+shift+m', 'cmd+shift+m'],
22
9
  insertOrderedList: ['ctrl+shift+7', 'cmd+shift+7'],