jodit 4.14.0 → 4.14.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/CHANGELOG.md +12 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +11 -11
- package/es2015/jodit.js +632 -547
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +9 -9
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +11 -33
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +11 -11
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +9 -9
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +16 -16
- package/es2021/jodit.js +638 -553
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +14 -14
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +11 -33
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +55 -55
- package/es2021.en/jodit.js +638 -553
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +55 -55
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +11 -33
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +314 -318
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +2 -2
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +3 -3
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +2 -2
- package/es5/polyfills.js +20 -5
- package/es5/polyfills.min.js +2 -2
- package/esm/core/constants.js +1 -1
- package/esm/plugins/search/ui/search.js +1 -1
- package/package.json +1 -1
|
@@ -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.14.
|
|
4
|
+
* Version: v4.14.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -140,36 +140,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.speechRecogn
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
|
|
143
|
-
/***/ }),
|
|
144
|
-
|
|
145
|
-
/***/ 94092:
|
|
146
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
147
|
-
|
|
148
|
-
"use strict";
|
|
149
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
150
|
-
/* harmony export */ PII: function() { return /* binding */ PII; },
|
|
151
|
-
/* harmony export */ WARN: function() { return /* binding */ WARN; }
|
|
152
|
-
/* harmony export */ });
|
|
153
|
-
/*!
|
|
154
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
155
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
156
|
-
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
157
|
-
*/ /**
|
|
158
|
-
* @module plugins/speech-recognize
|
|
159
|
-
* @internal
|
|
160
|
-
*/ const PII = 440;
|
|
161
|
-
const WARN = 940;
|
|
162
|
-
|
|
163
|
-
|
|
164
143
|
/***/ }),
|
|
165
144
|
|
|
166
145
|
/***/ 97743:
|
|
167
146
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
168
147
|
|
|
169
148
|
"use strict";
|
|
170
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
171
|
-
/* harmony export */ SpeechRecognition: function() { return /* binding */ SpeechRecognition; }
|
|
172
|
-
/* harmony export */ });
|
|
173
149
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
174
150
|
/*!
|
|
175
151
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
@@ -180,6 +156,10 @@ const WARN = 940;
|
|
|
180
156
|
*/
|
|
181
157
|
const SpeechRecognition = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow ? jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.SpeechRecognition || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.webkitSpeechRecognition : undefined;
|
|
182
158
|
|
|
159
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
160
|
+
/* harmony export */ "SpeechRecognition", 0, /* binding */ SpeechRecognition
|
|
161
|
+
/* harmony export */ ]);
|
|
162
|
+
|
|
183
163
|
|
|
184
164
|
/***/ }),
|
|
185
165
|
|
|
@@ -219,7 +199,6 @@ const SpeechRecognition = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.glob
|
|
|
219
199
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84839);
|
|
220
200
|
/* harmony import */ var jodit_core_event_emitter_eventify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60216);
|
|
221
201
|
/* harmony import */ var _sound__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(32560);
|
|
222
|
-
/* harmony import */ var jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94092);
|
|
223
202
|
/*!
|
|
224
203
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
225
204
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -316,7 +295,7 @@ class RecognizeManager extends jodit_core_event_emitter_eventify__WEBPACK_IMPORT
|
|
|
316
295
|
this.emit('pulse', false);
|
|
317
296
|
this.emit('result', this.__interimResults);
|
|
318
297
|
this.__interimResults = '';
|
|
319
|
-
this._makeSound(
|
|
298
|
+
this._makeSound((/* inlined export .PII */440));
|
|
320
299
|
this.restart();
|
|
321
300
|
}
|
|
322
301
|
_onProgress(e) {
|
|
@@ -349,7 +328,7 @@ class RecognizeManager extends jodit_core_event_emitter_eventify__WEBPACK_IMPORT
|
|
|
349
328
|
e.error === 'language-not-supported') {
|
|
350
329
|
this.emit('error', 'Language unavailable');
|
|
351
330
|
}
|
|
352
|
-
this._makeSound(
|
|
331
|
+
this._makeSound((/* inlined export .WARN */940));
|
|
353
332
|
this.emit('pulse', false);
|
|
354
333
|
this.stop();
|
|
355
334
|
}
|
|
@@ -369,7 +348,7 @@ class RecognizeManager extends jodit_core_event_emitter_eventify__WEBPACK_IMPORT
|
|
|
369
348
|
this._restartTimeout = this.async.setTimeout(()=>{
|
|
370
349
|
this.restart();
|
|
371
350
|
this.emit('pulse', false);
|
|
372
|
-
this._makeSound(
|
|
351
|
+
this._makeSound((/* inlined export .WARN */940));
|
|
373
352
|
}, 5000);
|
|
374
353
|
this.emit('pulse', true);
|
|
375
354
|
}, this.__interimResults = '';
|
|
@@ -377,7 +356,7 @@ class RecognizeManager extends jodit_core_event_emitter_eventify__WEBPACK_IMPORT
|
|
|
377
356
|
RecognizeManager._instances.add(this);
|
|
378
357
|
}
|
|
379
358
|
}
|
|
380
|
-
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(RecognizeManager, "_instances", new Set());
|
|
359
|
+
;(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(RecognizeManager, "_instances", new Set());
|
|
381
360
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
382
361
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
383
362
|
], RecognizeManager.prototype, "_onResults", null);
|
|
@@ -400,7 +379,6 @@ class RecognizeManager extends jodit_core_event_emitter_eventify__WEBPACK_IMPORT
|
|
|
400
379
|
/* harmony export */ sound: function() { return /* binding */ sound; }
|
|
401
380
|
/* harmony export */ });
|
|
402
381
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
|
|
403
|
-
/* harmony import */ var jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94092);
|
|
404
382
|
/*!
|
|
405
383
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
406
384
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -436,7 +414,7 @@ function getContext(owner) {
|
|
|
436
414
|
/**
|
|
437
415
|
* Play a short beep on the owner's (lazily created, reused) AudioContext.
|
|
438
416
|
* @internal
|
|
439
|
-
*/ function sound(owner, { sec = 0.1, frequency =
|
|
417
|
+
*/ function sound(owner, { sec = 0.1, frequency = (/* inlined export .PII */440), gain = 0.1, type = 'sine' } = {}) {
|
|
440
418
|
const context = getContext(owner);
|
|
441
419
|
if (!context) {
|
|
442
420
|
return;
|
|
@@ -643,7 +621,7 @@ class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_6
|
|
|
643
621
|
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "messagePopup", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__hidePopupTimeout", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "_commandToWord", {});
|
|
644
622
|
}
|
|
645
623
|
}
|
|
646
|
-
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
624
|
+
;(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
647
625
|
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_2__.watch)(':speechRecognizeProgressResult')
|
|
648
626
|
], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
|
|
649
627
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
@@ -1,8 +1,8 @@
|
|
|
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.14.
|
|
4
|
+
* Version: v4.14.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}}(self,function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{75143:function(e,t,s){"use strict";var i=s(22289),n=s(85932),o=s(7909),r=s(36400),u=s(29434),c=s(5266),a=s(97743),l=s(68097),h=s(22227),p=s.n(h);c.Config.prototype.speechRecognize={api:void 0!==a.SpeechRecognition?a.SpeechRecognition:null,sound:!0,continuous:!1,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"}},u.Icon.set("speech-recognize",p()),c.Config.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){let s=(0,r.dataBind)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:u}){let{api:c,lang:a,continuous:h,interimResults:p,sound:d}=e.o.speechRecognize;if(!c)return void e.alert("Speech recognize API unsupported in your browser");let _=(0,r.dataBind)(e,"speech");if(!_){let t=new c;(_=new l.RecognizeManager(e.async,t)).lang=(0,n.isString)(a)?a:(0,o.attr)(e.od.documentElement,"lang")??void 0,_.continuous=h,_.interimResults=p,_.sound=d,(0,r.dataBind)(e,"speech",_),_.on("pulse",e=>{s.setMod("pulse",e)}),_.on("result",t=>e.e.fire("speechRecognizeResult",t)),_.on("progress",t=>e.e.fire("speechRecognizeProgressResult",t)),_.on("error",t=>e.message.error(t)),e.hookStatus("beforeDestruct",()=>{(0,r.dataBind)(e,"speech",null),_.destruct()})}if(u.args){let e=u.args[0];if((0,i.isBoolean)(_[e])){_[e]=!_[e],_.isEnabled&&_.restart();return}}_.toggle(),_.isEnabled&&s.setMod("pulse",!0),s.state.activated=_.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){let i=(0,r.dataBind)(e,"speech"),n=i?.[t]??e.o.speechRecognize[t];return`<span class='jodit-speech-recognize__list-item'><input ${n?"checked":""} class='jodit-checkbox' type='checkbox'> ${s}</span>`},mods:{stroke:!1}}},
|
|
8
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}}(self,function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{75143:function(e,t,s){"use strict";var i=s(22289),n=s(85932),o=s(7909),r=s(36400),u=s(29434),c=s(5266),a=s(97743),l=s(68097),h=s(22227),p=s.n(h);c.Config.prototype.speechRecognize={api:void 0!==a.SpeechRecognition?a.SpeechRecognition:null,sound:!0,continuous:!1,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"}},u.Icon.set("speech-recognize",p()),c.Config.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){let s=(0,r.dataBind)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:u}){let{api:c,lang:a,continuous:h,interimResults:p,sound:d}=e.o.speechRecognize;if(!c)return void e.alert("Speech recognize API unsupported in your browser");let _=(0,r.dataBind)(e,"speech");if(!_){let t=new c;(_=new l.RecognizeManager(e.async,t)).lang=(0,n.isString)(a)?a:(0,o.attr)(e.od.documentElement,"lang")??void 0,_.continuous=h,_.interimResults=p,_.sound=d,(0,r.dataBind)(e,"speech",_),_.on("pulse",e=>{s.setMod("pulse",e)}),_.on("result",t=>e.e.fire("speechRecognizeResult",t)),_.on("progress",t=>e.e.fire("speechRecognizeProgressResult",t)),_.on("error",t=>e.message.error(t)),e.hookStatus("beforeDestruct",()=>{(0,r.dataBind)(e,"speech",null),_.destruct()})}if(u.args){let e=u.args[0];if((0,i.isBoolean)(_[e])){_[e]=!_[e],_.isEnabled&&_.restart();return}}_.toggle(),_.isEnabled&&s.setMod("pulse",!0),s.state.activated=_.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){let i=(0,r.dataBind)(e,"speech"),n=i?.[t]??e.o.speechRecognize[t];return`<span class='jodit-speech-recognize__list-item'><input ${n?"checked":""} class='jodit-checkbox' type='checkbox'> ${s}</span>`},mods:{stroke:!1}}},97743:function(e,t,s){"use strict";var i=s(81937);let n=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0;s.d(t,["SpeechRecognition",0,n])},86581:function(e,t,s){"use strict";function i(e,t){let[s,i]=t.split("::");"open"===s.toLowerCase()&&i&&/^(javascript:|data:|vbscript:)/i.test(i.trim())||e.execCommand(s,null,i)}s.d(t,{execSpellCommand:function(){return i}})},68097:function(e,t,s){"use strict";s.d(t,{RecognizeManager:function(){return c}});var i=s(25045),n=s(31635),o=s(84839),r=s(60216),u=s(32560);class c extends r.Eventify{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}destruct(){this.stop(),(0,u.closeSound)(this),c._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,c._instances.forEach(e=>{e!==this&&e.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(440),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;t<e.results.length;t++){let s=e.results.item(t);if(s.length){let{transcript:e}=s.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),("language-unavailable"===e.error||"language-not-supported"===e.error)&&this.emit("error","Language unavailable"),this._makeSound(940),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,u.sound)(this,{frequency:e})}constructor(e,t){super(),(0,i._)(this,"async",void 0),(0,i._)(this,"_lang",void 0),(0,i._)(this,"_continuous",void 0),(0,i._)(this,"_interimResults",void 0),(0,i._)(this,"sound",void 0),(0,i._)(this,"_isEnabled",void 0),(0,i._)(this,"_restartTimeout",void 0),(0,i._)(this,"_onSpeechStart",void 0),(0,i._)(this,"_api",void 0),(0,i._)(this,"__interimResults",void 0),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout(()=>{this.restart(),this.emit("pulse",!1),this._makeSound(940)},5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,c._instances.add(this)}}(0,i._)(c,"_instances",new Set),(0,n.__decorate)([o.autobind],c.prototype,"_onResults",null),(0,n.__decorate)([o.autobind],c.prototype,"_onProgress",null),(0,n.__decorate)([o.autobind],c.prototype,"_onError",null)},32560:function(e,t,s){"use strict";s.d(t,{closeSound:function(){return r},sound:function(){return o}});var i=s(81937);let n=new WeakMap;function o(e,{sec:t=.1,frequency:s=440,gain:r=.1,type:u="sine"}={}){let c=function(e){if(!i.globalWindow)return null;let t=n.get(e);if(t&&"closed"!==t.state)return t;let s=i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext;if(!s)return null;let o=new s;return n.set(e,o),o}(e);if(!c)return;let a=c.createGain(),l=c.createOscillator();l.type=u,l.frequency.value=s,a.gain.value=r,l.connect(a),a.connect(c.destination),l.start(),l.stop(c.currentTime+t)}function r(e){let t=n.get(e);t&&(n.delete(e),"closed"!==t.state&&t.close())}},43219:function(e,t,s){"use strict";s.r(t),s.d(t,{ar:function(){return i},cs_cz:function(){return i},de:function(){return i},es:function(){return i},fa:function(){return i},fi:function(){return i},fr:function(){return i},he:function(){return i},hu:function(){return i},id:function(){return i},it:function(){return i},ja:function(){return i},ko:function(){return i},mn:function(){return i},nl:function(){return i},no:function(){return i},pl:function(){return i},pt_br:function(){return i},ru:function(){return i},sk:function(){return i},tr:function(){return i},ua:function(){return i},zh_cn:function(){return i},zh_tw:function(){return i}});var i=s(41324)},31262:function(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative:function(){return d}});var i=s(25045),n=s(31635),o=s(68616),r=s(23211),u=s(28077),c=s(71125),a=s(91206);s(75143);var l=s(73302),h=s(86581),p=s(43219);class d extends a.Plugin{afterInit(e){let{commands:t}=e.o.speechRecognize;t&&((0,u.extendLang)(p),(0,c.keys)(t,!1).forEach(s=>{s.split("|").forEach(i=>{i=i.trim().toLowerCase(),this._commandToWord[i]=t[s];let n=e.i18n(i);n!==i&&n.split("|").forEach(e=>{this._commandToWord[e.trim().toLowerCase()]=t[s].trim()})})}))}beforeDestruct(e){r.Dom.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),r.Dom.append(this.j.workplace,this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(()=>{r.Dom.safeRemove(this.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),r.Dom.safeRemove(this.messagePopup);let{j:t}=this,{s}=t;if(!this._checkCommand(e)){let{range:i}=s,n=s.current();if(s.isCollapsed()&&r.Dom.isText(n)&&r.Dom.isOrContains(t.editor,n)&&n.nodeValue){let o=n.nodeValue;n.nodeValue=o+(/[\u00A0 ]\uFEFF*$/.test(o)?"":" ")+e,i.setStartAfter(n),s.selectRange(i),t.synchronizeValues()}else s.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,h.execSpellCommand)(this.j,this._commandToWord[e]),!0)}constructor(...e){super(...e),(0,i._)(this,"buttons",[{group:"state",name:"speechRecognize"}]),(0,i._)(this,"messagePopup",void 0),(0,i._)(this,"__hidePopupTimeout",void 0),(0,i._)(this,"_commandToWord",{})}}(0,n.__decorate)([(0,o.watch)(":speechRecognizeProgressResult")],d.prototype,"onSpeechRecognizeProgressResult",null),(0,n.__decorate)([(0,o.watch)(":speechRecognizeResult")],d.prototype,"onSpeechRecognizeResult",null),l.Jodit.plugins.add("speech-recognize",d)},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=31262)}])});
|
package/es5/jodit.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.14.
|
|
4
|
+
* Version: v4.14.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.14.
|
|
11
|
+
* Version: v4.14.2
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|