jodit 4.17.1 → 4.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/.nvmrc +1 -0
  2. package/CHANGELOG.md +12 -0
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.fat.min.js +4 -4
  5. package/es2015/jodit.js +182 -7
  6. package/es2015/jodit.min.js +4 -4
  7. package/es2015/plugins/debug/debug.css +1 -1
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  13. package/es2018/jodit.fat.min.js +4 -4
  14. package/es2018/jodit.min.js +4 -4
  15. package/es2018/plugins/debug/debug.min.js +1 -1
  16. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  17. package/es2021/jodit.css +1 -1
  18. package/es2021/jodit.fat.min.js +6 -6
  19. package/es2021/jodit.js +182 -7
  20. package/es2021/jodit.min.js +6 -6
  21. package/es2021/plugins/debug/debug.css +1 -1
  22. package/es2021/plugins/debug/debug.js +1 -1
  23. package/es2021/plugins/debug/debug.min.js +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  26. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  27. package/es2021.en/jodit.css +1 -1
  28. package/es2021.en/jodit.fat.min.js +24 -24
  29. package/es2021.en/jodit.js +182 -7
  30. package/es2021.en/jodit.min.js +6 -6
  31. package/es2021.en/plugins/debug/debug.css +1 -1
  32. package/es2021.en/plugins/debug/debug.js +1 -1
  33. package/es2021.en/plugins/debug/debug.min.js +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  37. package/es5/jodit.css +2 -2
  38. package/es5/jodit.fat.min.js +2 -2
  39. package/es5/jodit.js +217 -7
  40. package/es5/jodit.min.css +2 -2
  41. package/es5/jodit.min.js +2 -2
  42. package/es5/plugins/debug/debug.css +1 -1
  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 +1 -1
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  48. package/es5/polyfills.fat.min.js +1 -1
  49. package/es5/polyfills.js +1 -1
  50. package/es5/polyfills.min.js +1 -1
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/helpers/html/safe-html.js +15 -0
  53. package/esm/core/selection/helpers/composed-ranges.d.ts +21 -0
  54. package/esm/core/selection/helpers/composed-ranges.js +45 -0
  55. package/esm/core/selection/helpers/index.d.ts +1 -0
  56. package/esm/core/selection/helpers/index.js +1 -0
  57. package/esm/core/selection/selection.d.ts +23 -0
  58. package/esm/core/selection/selection.js +80 -4
  59. package/esm/jodit.js +5 -0
  60. package/esm/plugins/clean-html/clean-html.d.ts +8 -0
  61. package/esm/plugins/clean-html/clean-html.js +13 -0
  62. package/examples/build/es2015/jodit.min.css +1 -0
  63. package/examples/build/es2015/jodit.min.js +10 -0
  64. package/examples/build/es2015/plugins/debug/debug.min.js +10 -0
  65. package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.css +1 -0
  66. package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.js +10 -0
  67. package/package.json +1 -1
  68. package/types/core/selection/helpers/composed-ranges.d.ts +21 -0
  69. package/types/core/selection/helpers/index.d.ts +1 -0
  70. package/types/core/selection/selection.d.ts +23 -0
  71. package/types/plugins/clean-html/clean-html.d.ts +8 -0
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
+ * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
+ * Version: v4.0.0-beta.86
5
+ * Url: https://xdsoft.net/jodit/
6
+ * License(s): MIT
7
+ */
8
+
9
+
10
+ "use strict";!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[101],{83780:function(e,n,t){t.r(n),t.d(n,{Debug:function(){return a}});var o=t(97651),r=(t(79102),t(9162)),i=t(44058),d=t(62924);class a extends o.S{afterInit(e){const n=e.create.div(),t=e.create.div(),o=e.create.div();n.appendChild(t),n.appendChild(o),e.workplace.appendChild(n),Object.assign(n.style,{padding:"16px",backgroundColor:"#fcfcfc"}),Object.assign(o.style,{paddingTop:"16px"}),e.e.on("keydown keyup keypress change afterInit updateDebug",(()=>{t.innerHTML=s(e.editor)})).on(e.od,"selectionchange",(()=>{const n=e.selection.range;t.innerHTML=s(e.editor),o.innerHTML=`start ${n.startContainer.nodeName} ${n.startOffset}<br>end ${n.endContainer.nodeName} ${n.endOffset}`}))}beforeDestruct(e){}}function s(e,n=0){return`<div style='padding-left: ${5*n}px'>\n\t\t${e.nodeName} ${r.i.isText(e)?`- ${function(e){return e.nodeValue?(0,i.o)(e.nodeValue.replace((0,d.INVISIBLE_SPACE_REG_EXP)(),"INV")):"<span style='color:red'>empty</span>"}(e)}`:""}\n\t${Array.from(e.childNodes).map((e=>s(e,n+1))).join("")}\n</div>`}}},function(e){return e(e.s=83780)}])}));
@@ -0,0 +1 @@
1
+ @keyframes a{0%{fill:green;opacity:.3}to{fill:#4285f4}}svg.jodit-icon_speechRecognize{stroke:none!important}.jodit-toolbar-button_pulse_true svg{animation-duration:.7s;animation-iteration-count:infinite;animation-name:a}.jodit-speech-recognize__list-item{display:flex;padding:var(--jd-padding-default)}.jodit-speech-recognize__popup{background-color:hsla(0,0%,94%,.4);border-radius:8px;font-family:var(--jd-font-default);font-size:var(--jd-font-size-default);font-size:32px;left:50%;padding:24px;position:absolute;top:50%;transform:translate(-50%,-50%)}
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
+ * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
+ * Version: v4.0.0-beta.86
5
+ * Url: https://xdsoft.net/jodit/
6
+ * License(s): MIT
7
+ */
8
+
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 s in n)("object"==typeof exports?exports:e)[s]=n[s]}}(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[781],{92880:function(e,t,n){"use strict";var s=n(37446),i=n(25920),o=n(88751),r=n(30052),c=n(30043),u=n(17439),a=n(55106),l=n.n(a);s.D.prototype.speechRecognize={api:u.M,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"}},r.J.set("speech-recognize",l()),s.D.prototype.controls.speechRecognize={isActive(e,t){const n=(0,i.q)(e,"speech");return Boolean(null==n?void 0:n.isEnabled)},isDisabled(e){return!e.o.speechRecognize.api},exec(e,t,{button:n,control:s}){const{api:r,lang:u,continuous:a,interimResults:l,sound:p}=e.o.speechRecognize;if(!r)return void e.alert("Speech recognize API unsupported in your browser");let h=(0,i.q)(e,"speech");if(!h){const t=new r;h=new c.v(e.async,t),h.lang=u,h.continuous=a,h.interimResults=l,h.sound=p,(0,i.q)(e,"speech",h),h.on("pulse",(e=>{n.setMod("pulse",e)})),h.on("result",(t=>e.e.fire("speechRecognizeResult",t))),h.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),n.hookStatus("beforeDestruct",(()=>{h.destruct()}))}if(s.args){const e=s.args[0];if((0,o.j)(h[e]))return h[e]=!h[e],void(h.isEnabled&&h.restart())}h.toggle(),n.state.activated=h.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,n){var s;const o=(0,i.q)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${(null!==(s=null==o?void 0:o[t])&&void 0!==s?s:e.o.speechRecognize[t])?"checked":""} class='jodit-checkbox' type='checkbox'>&nbsp;${n}</span>`},mods:{stroke:!1}}},16618:function(e,t,n){"use strict";n.d(t,{n:function(){return s},u:function(){return i}});const s=440,i=940},17439:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});const s=window.SpeechRecognition||window.webkitSpeechRecognition},87885:function(e,t,n){"use strict";function s(e,t){const[n,s]=t.split("::");e.execCommand(n,null,s)}n.d(t,{c:function(){return s}})},30043:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});var s,i=n(97582),o=n(3569),r=n(13666),c=n(16618),u=n(55486);let a=s=class e extends o.a{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}constructor(e,t){super(),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.u)}),5e3),this.emit("pulse",!0))},this._progressTimeout=0,this._api=t,s._instances.add(this)}destruct(){this.stop(),s._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){this._isEnabled||(this._isEnabled=!0,s._instances.forEach((e=>{e!==this&&e.stop()})),this._api.start(),this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onResult))}stop(){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)}}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}_onResult(e){if(!this._isEnabled)return;this.async.clearTimeout(this._progressTimeout);const t=e.results.item(e.resultIndex),{transcript:n}=t.item(0),s=()=>{try{this.async.clearTimeout(this._restartTimeout),this.emit("result",n)}catch(e){}this.restart(),this.emit("pulse",!1),this._makeSound(c.n)};if(!1===t.isFinal)return this.emit("progress",n),void(this._progressTimeout=this.async.setTimeout(s,500));s()}_onError(){this._isEnabled&&(this._makeSound(c.u),this.emit("pulse",!1),this.restart())}_makeSound(e){this.sound&&(0,u.e)({frequency:e})}};a._instances=new Set,a=s=(0,i.gn)([r.autobind],a)},55486:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});var s=n(16618);function i({sec:e=.1,frequency:t=s.n,gain:n=.1,type:i="sine"}={}){if(void 0===window.AudioContext&&void 0===window.webkitAudioContext)return;const o=new(window.AudioContext||window.webkitAudioContext),r=o.createGain(),c=o.createOscillator();c.type=i,c.frequency.value=t,c.connect(r),r.connect(o.destination),c.start(),c.stop(o.currentTime+e),r.gain.value=n}},57998:function(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},90833: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"}},36373:function(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},97192: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"}},6043:function(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},76305: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"}},45834:function(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},40509: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"}},75720:function(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},75813:function(e,t,n){"use strict";n.r(t),n.d(t,{ar:function(){return s},cs_cz:function(){return i},de:function(){return o},es:function(){return r},fa:function(){return c},fr:function(){return u},he:function(){return a},hu:function(){return l},id:function(){return p},it:function(){return h},ja:function(){return d},ko:function(){return m},mn:function(){return f},nl:function(){return g},pl:function(){return R},pt_br:function(){return _},ru:function(){return S},tr:function(){return w},zh_cn:function(){return z},zh_tw:function(){return v}});var s=n(57998),i=n(90833),o=n(36373),r=n(97192),c=n(6043),u=n(76305),a=n(45834),l=n(40509),p=n(75720),h=n(88369),d=n(30878),m=n(37780),f=n(4105),g=n(2589),R=n(72556),_=n(11695),S=n(52415),w=n(14569),z=n(58649),v=n(66040)},88369:function(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},30878:function(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},37780:function(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},4105:function(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},2589:function(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},72556:function(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},11695:function(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},52415:function(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},14569: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"}},58649:function(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},66040:function(e){"use strict";e.exports={newline:"นิวไลน์",delete:"ลบ",space:"พื้นที่","Speech Recognize":"การรับรู้คำพูด",Sound:"เสียง","Interim Results":"ผลระหว่างกาล"}},71327:function(e,t,n){"use strict";n.r(t),n.d(t,{SpeechRecognizeNative:function(){return d}});var s=n(97582),i=n(7331),o=n(69082),r=n(87398),c=n(79102),u=n(9162),a=n(62294),l=n(44380),p=n(87885),h=n(75813);n(92880);class d extends i.S{constructor(e){super(e),this._commandToWord={},e.o.speechRecognize.api&&e.registerButton({group:"state",name:"speechRecognize"})}afterInit(e){const{commands:t}=e.o.speechRecognize;t&&((0,c.xl)(h),(0,r.XP)(t,!1).forEach((n=>{n.split("|").forEach((s=>{s=s.trim().toLowerCase(),this._commandToWord[s]=t[n];const i=e.i18n(s);i!==s&&i.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[n].trim()}))}))})))}beforeDestruct(e){}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.setTimeout((()=>{u.i.safeRemove(this.messagePopup)}),{label:"onSpeechRecognizeProgressResult",timeout:1e3}),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){const{j:t}=this,{s:n}=t;if(u.i.safeRemove(this.messagePopup),!this._checkCommand(e)){const{range:s}=n,i=n.current();if(n.isCollapsed()&&u.i.isText(i)&&u.i.isOrContains(t.editor,i)&&i.nodeValue){const o=i.nodeValue;i.nodeValue=o+(/[\u00A0 ]\uFEFF*$/.test(o)?"":" ")+e,s.setStartAfter(i),n.selectRange(s),t.synchronizeValues()}else n.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,p.c)(this.j,this._commandToWord[e]),!0)}}(0,s.gn)([(0,o.YP)(":speechRecognizeProgressResult"),(0,a.D)()],d.prototype,"onSpeechRecognizeProgressResult",null),(0,s.gn)([(0,o.YP)(":speechRecognizeResult")],d.prototype,"onSpeechRecognizeResult",null),l.h.plugins.add("speech-recognize",d)},55106: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=71327)}])}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.17.1",
3
+ "version": "4.17.3",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Jodit Editor (https://xdsoft.net/jodit/)
3
+ * Released under MIT see LICENSE.txt in the project root for license information.
4
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
+ */
6
+ /**
7
+ * @module selection
8
+ */
9
+ import type { Nullable } from "../../../types/index";
10
+ /**
11
+ * Ranges of a selection that lies inside the given shadow tree.
12
+ *
13
+ * `window.getSelection()` stops at the shadow boundary and reports the host
14
+ * instead of the node the caret is really in. `getComposedRanges` is the
15
+ * standard way to ask past that boundary.
16
+ *
17
+ * @returns `null` when the browser has no `getComposedRanges`, or when neither
18
+ * call shape returned ranges that point inside the shadow tree — in which case
19
+ * there is nothing better to offer than the plain window selection.
20
+ */
21
+ export declare function composedRanges(selection: Selection, shadowRoot: ShadowRoot): Nullable<StaticRange[]>;
@@ -3,6 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
+ export * from "./composed-ranges";
6
7
  export * from "./move-node-inside-start";
7
8
  export * from "./move-the-node-along-the-edge-outward";
8
9
  /**
@@ -37,6 +37,29 @@ export declare class Selection implements ISelect {
37
37
  * Return current selection object
38
38
  */
39
39
  get sel(): ISelect['sel'];
40
+ /**
41
+ * Selection of a shadow tree in a browser without `ShadowRoot.getSelection`.
42
+ *
43
+ * `ShadowRoot.getSelection()` is a non-standard method that WebKit never
44
+ * implemented, and `window.getSelection()` stops at the shadow boundary: for
45
+ * a caret inside the shadow tree it reports the host, or the document
46
+ * itself. Everything downstream then works on the wrong tree, which is why
47
+ * Backspace used to throw `HierarchyRequestError` and Enter did nothing when
48
+ * the editor lived in a shadow root in Safari.
49
+ *
50
+ * The standard replacement is `Selection.getComposedRanges()`, which does
51
+ * reach into a shadow tree it is given. It hands back `StaticRange`s, and
52
+ * the editor mutates ranges constantly, so they are turned into live ones.
53
+ *
54
+ * Reads are answered from those ranges; everything else, including the
55
+ * writes (`addRange`, `removeAllRanges`, `setBaseAndExtent`), goes to the
56
+ * real selection, which does accept nodes inside a shadow tree. Reading is
57
+ * the only side the browser blocks.
58
+ *
59
+ * @returns `null` when the browser offers neither API, so the caller falls
60
+ * back to the plain window selection.
61
+ */
62
+ private __composedSelection;
40
63
  /**
41
64
  * Return first selected range or create new
42
65
  */
@@ -25,6 +25,14 @@ export declare class cleanHtml extends Plugin {
25
25
  private walker;
26
26
  protected startWalker(): void;
27
27
  protected beforeCommand(command: string): void | false;
28
+ /**
29
+ * The value was sanitized in an inert document and has just been re-parsed
30
+ * into the live editor with scripting on. Where the two parsers disagree
31
+ * (`<noscript>`, raw-text elements), markup that was inert text a moment
32
+ * ago is a real element now, so the live tree is sanitized once more, in
33
+ * the same call stack, before any handler it might carry can fire.
34
+ */
35
+ protected onAfterSetNativeEditorValue(): void;
28
36
  /**
29
37
  * Event handler when manually assigning a value to the HTML editor.
30
38
  */