jodit 4.7.6 → 4.7.8
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +2 -2
- package/es2015/jodit.min.js +2 -2
- 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 +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +39 -39
- package/es2021/jodit.js +2 -2
- package/es2021/jodit.min.js +40 -40
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +4 -4
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +76 -76
- package/es2021.en/jodit.js +2 -2
- package/es2021.en/jodit.min.js +76 -76
- 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 +4 -4
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +2 -2
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- 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 +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
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.7.
|
|
4
|
+
* Version: v4.7.8
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
|
-
"use strict"
|
|
8
|
+
"use strict";!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 s in n)("object"==typeof exports?exports:e)[s]=n[s]}}(self,function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[486],{96206:function(e,t,n){n.r(t),n.d(t,{Debug:function(){return i}});var s=n(81937),o=n(23211),a=n(22852),r=n(18855);class i extends r.Plugin{afterInit(e){let t=e.create.div("jodit-debug"),n=e.create.div("jodit-debug__tree"),r=e.create.div("jodit-debug__events"),i=e.create.div("jodit-debug__events-clear",["x"]),d=e.create.div("jodit-debug__sel");function c(){let t=e.selection.range;n.innerHTML=function e(t,n,r){let i=window.getSelection()?.containsNode(t),d=[`<span class="jodit-debug__tree-elm-name">${t.nodeName}</span>`,o.Dom.isText(t)?"- "+function(e,t){if(!e.nodeValue)return"<span style='color:red'>empty</span>";let n=e.nodeValue;return t.collapsed?e===t.startContainer&&(n=n.slice(0,t.startOffset)+"%CURSOR%"+n.slice(t.startOffset)):e===t.startContainer&&e===t.endContainer?n=n.slice(0,t.startOffset)+"%START-CURSOR%"+n.slice(t.startOffset,t.endOffset)+"%END-CURSOR%"+n.slice(t.endOffset):e===t.startContainer?n=n.slice(0,t.startOffset)+"%CURSOR%"+n.slice(t.startOffset):e===t.endContainer&&(n=n.slice(0,t.endOffset)+"%CURSOR%"+n.slice(t.endOffset)),(0,a.stripTags)(n.replace((0,s.INVISIBLE_SPACE_REG_EXP)(),"INV")).replace(/%CURSOR%/,'<span class="jodit-debug__tree-cursor">|</span>').replace(/%START-CURSOR%/,'<span class="jodit-debug__tree-cursor">|').replace(/%END-CURSOR%/,"|</span>")}(t,r):""].map(e=>e.trim()).filter(Boolean);return`<div class="${i?"jodit-debug__tree-element_selected":""}" style='padding-left: ${5*n}px'>
|
|
9
9
|
${d.join(" ")}
|
|
10
|
-
${Array.from(t.childNodes).map((s,
|
|
11
|
-
</div>`}(e.editor,0,t),d.innerHTML=`start ${t.startContainer.nodeName} ${t.startOffset}<br>end ${t.endContainer.nodeName} ${t.endOffset}`}function l(t){let n=e.e.current,s=e.create.div();s.innerHTML=`<span>${new Date().toLocaleTimeString()}</span> ${(
|
|
10
|
+
${Array.from(t.childNodes).map((s,o)=>{let a=[];return r.startContainer===t&&o===r.startOffset&&a.push('<span class="jodit-debug__tree-cursor">|</span>'),a.push(e(s,n+1,r)),r.endContainer===t&&o===r.endOffset&&a.push('<span class="jodit-debug__tree-cursor">|</span>'),a}).flat().join("")}
|
|
11
|
+
</div>`}(e.editor,0,t),d.innerHTML=`start ${t.startContainer.nodeName} ${t.startOffset}<br>end ${t.endContainer.nodeName} ${t.endOffset}`}function l(t){let n=e.e.current,s=e.create.div();s.innerHTML=`<span>${new Date().toLocaleTimeString()}</span> ${function(e,t){let n=[e??t.type];switch(e){case"beforeCommand":case"afterCommand":n.push(`<span>${t.toString()}</span>`);break;case"keydown":case"keyup":case"keypress":t.shiftKey&&"Shift"!==t.key&&n.push("Shift+"),t.ctrlKey&&"Control"!==t.key&&n.push("Ctrl+"),t.altKey&&"Alt"!==t.key&&n.push("Alt"),n.push(""+t.key)}return t&&o.Dom.isNode(t.target)&&n.push(`<span>${t.target.nodeName}</span>`),n.join(" ")}(n,t)}`,r.appendChild(s),r.scrollTop=r.scrollHeight,e.async.setTimeout(()=>{r.children.length>100&&r.removeChild(r.children[0])},100)}t.appendChild(n),t.appendChild(r),r.appendChild(i),t.appendChild(d),i.addEventListener("click",()=>{r.innerHTML="",r.appendChild(i)}),e.workplace.appendChild(t),e.e.on("keydown keyup keypress change afterInit updateDebug",c).on(["activate","afterInit","beforeactivate","beforeblur","beforedeactivate","beforefocus","beforeinput","blur","change","click","compositionend","compositionstart","compositionupdate","contextmenu","copy","cut","dblclick","deactivate","focus","focusin","focusout","focusout","input","keydown","keypress","keyup","mousedown","mouseup","paste","selectionchange","selectionstart","dragstart","drop","dragover","resize touchstart touchend","updateDebug","beforeCommand","afterCommand","wheel"],l).on(e.od,"selectionchange",l).on(e.od,"selectionchange",c)}beforeDestruct(e){}}}},function(e){return e(e.s=96206)}])});
|
|
@@ -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.7.
|
|
4
|
+
* Version: v4.7.8
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
|
-
(
|
|
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],{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>'},31262:function(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative:function(){return p}});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),d=s(43219);class p extends a.Plugin{afterInit(e){let{commands:t}=e.o.speechRecognize;t&&((0,u.extendLang)(d),(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")),this.j.workplace.appendChild(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")],p.prototype,"onSpeechRecognizeProgressResult",null),(0,n.__decorate)([(0,o.watch)(":speechRecognizeResult")],p.prototype,"onSpeechRecognizeResult",null),l.Jodit.plugins.add("speech-recognize",p)},32560:function(e,t,s){"use strict";s.d(t,{sound:function(){return o}});var i=s(81937),n=s(94092);function o({sec:e=.1,frequency:t=n.PII,gain:s=.1,type:r="sine"}={}){if(!i.globalWindow||void 0===i.globalWindow.AudioContext&&void 0===i.globalWindow.webkitAudioContext)return;let u=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),c=u.createGain(),a=u.createOscillator();a.type=r,a.frequency.value=t,a.connect(c),c.connect(u.destination),a.start(),a.stop(u.currentTime+e),c.gain.value=s}},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},tr:function(){return i},ua:function(){return i},zh_cn:function(){return i},zh_tw:function(){return i}});var i=s(41324)},68097:function(e,t,s){"use strict";s.d(t,{RecognizeManager:function(){return a}});var i=s(25045),n=s(31635),o=s(84839),r=s(60216),u=s(32560),c=s(94092);class a 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(),a._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,a._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(c.PII),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(c.WARN),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,u.sound)({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(c.WARN)},5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,a._instances.add(this)}}(0,i._)(a,"_instances",new Set),(0,n.__decorate)([o.autobind],a.prototype,"_onResults",null),(0,n.__decorate)([o.autobind],a.prototype,"_onProgress",null),(0,n.__decorate)([o.autobind],a.prototype,"_onError",null)},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),d=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",d()),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:d,sound:p}=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=d,_.sound=p,(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)),s.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}}},86581:function(e,t,s){"use strict";function i(e,t){let[s,i]=t.split("::");e.execCommand(s,null,i)}s.d(t,{execSpellCommand:function(){return i}})},94092:function(e,t,s){"use strict";s.d(t,{PII:function(){return i},WARN:function(){return n}});let i=440,n=940},97743:function(e,t,s){"use strict";s.d(t,{SpeechRecognition:function(){return n}});var i=s(81937);let n=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0}},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.7.
|
|
4
|
+
* Version: v4.7.8
|
|
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.7.
|
|
11
|
+
* Version: v4.7.8
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|