@ckeditor/ckeditor5-restricted-editing 29.0.0 → 31.0.0
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/README.md +5 -1
- package/build/restricted-editing.js +1 -1
- package/build/translations/az.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/ku.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +44 -0
- package/package.json +22 -20
- package/src/restrictededitingmodeediting.js +32 -35
- package/src/restrictededitingmodenavigationcommand.js +3 -0
- package/CHANGELOG.md +0 -53
- package/build/restricted-editing.js.map +0 -1
package/README.md
CHANGED
@@ -7,9 +7,13 @@ CKEditor 5 restricted editing feature
|
|
7
7
|
|
8
8
|
This package implements the restricted editing feature for CKEditor 5.
|
9
9
|
|
10
|
+
## Demo
|
11
|
+
|
12
|
+
Check out the demo in the [restricted editing feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/restricted-editing.html#demo).
|
13
|
+
|
10
14
|
## Documentation
|
11
15
|
|
12
|
-
See the [`@ckeditor/ckeditor5-restricted-editing` package](https://ckeditor.com/docs/ckeditor5/latest/api/restricted-editing.html) page as well as the [
|
16
|
+
See the [`@ckeditor/ckeditor5-restricted-editing` package](https://ckeditor.com/docs/ckeditor5/latest/api/restricted-editing.html) page as well as the [restricted editing feature](https://ckeditor.com/docs/ckeditor5/latest/features/restricted-editing.html) guide in the [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
|
13
17
|
|
14
18
|
## License
|
15
19
|
|
@@ -2,4 +2,4 @@
|
|
2
2
|
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md.
|
4
4
|
*/
|
5
|
-
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.restrictedEditing=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8)}([function(e,t,i){e.exports=i(2)("./src/core.js")},function(e,t,i){e.exports=i(2)("./src/ui.js")},function(e,t){e.exports=CKEditor5.dll},function(e,t,i){var n=i(6),r=i(7);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(r,o);e.exports=r.locals||{}},function(e,t,i){e.exports=i(2)("./src/engine.js")},function(e,t,i){e.exports=i(2)("./src/utils.js")},function(e,t,i){"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),s=[];function c(e){for(var t=-1,i=0;i<s.length;i++)if(s[i].identifier===e){t=i;break}return t}function d(e,t){for(var i={},n=[],r=0;r<e.length;r++){var o=e[r],d=t.base?o[0]+t.base:o[0],a=i[d]||0,l="".concat(d," ").concat(a);i[d]=a+1;var g=c(l),u={css:o[1],media:o[2],sourceMap:o[3]};-1!==g?(s[g].references++,s[g].updater(u)):s.push({identifier:l,updater:h(u,t),references:1}),n.push(l)}return n}function a(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var s=o(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var l,g=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function u(e,t,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=g(t,r);else{var o=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function m(e,t,i){var n=i.css,r=i.media,o=i.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,f=0;function h(e,t){var i,n,r;if(t.singleton){var o=f++;i=p||(p=a(t)),n=u.bind(null,i,o,!1),r=u.bind(null,i,o,!0)}else i=a(t),n=m.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var i=d(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var r=c(i[n]);s[r].references--}for(var o=d(e,t),a=0;a<i.length;a++){var l=c(i[a]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}i=o}}}},function(e,t){e.exports=":root{--ck-color-restricted-editing-exception-background:rgba(255,169,77,0.2);--ck-color-restricted-editing-exception-hover-background:rgba(255,169,77,0.35);--ck-color-restricted-editing-exception-brackets:rgba(204,105,0,0.4);--ck-color-restricted-editing-selected-exception-background:rgba(255,169,77,0.5);--ck-color-restricted-editing-selected-exception-brackets:rgba(204,105,0,0.6)}.ck-editor__editable .restricted-editing-exception{transition:background .2s ease-in-out;background-color:var(--ck-color-restricted-editing-exception-background);border:1px solid;border-image:linear-gradient(90deg,var(--ck-color-restricted-editing-exception-brackets) 0,var(--ck-color-restricted-editing-exception-brackets) 5px,transparent 6px,transparent calc(100% - 6px),var(--ck-color-restricted-editing-exception-brackets) calc(100% - 5px),var(--ck-color-restricted-editing-exception-brackets)) 1}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_selected{background-color:var(--ck-color-restricted-editing-selected-exception-background);border-image:linear-gradient(90deg,var(--ck-color-restricted-editing-selected-exception-brackets) 0,var(--ck-color-restricted-editing-selected-exception-brackets) 5px,var(--ck-color-restricted-editing-selected-exception-brackets) calc(100% - 5px),var(--ck-color-restricted-editing-selected-exception-brackets)) 1}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_collapsed{padding-left:1ch}.ck-restricted-editing_mode_restricted,.ck-restricted-editing_mode_restricted *{cursor:default}.ck-restricted-editing_mode_restricted .restricted-editing-exception,.ck-restricted-editing_mode_restricted .restricted-editing-exception *{cursor:text}.ck-restricted-editing_mode_restricted .restricted-editing-exception:hover{background:var(--ck-color-restricted-editing-exception-hover-background)}"},function(e,t,i){"use strict";i.r(t),i.d(t,"RestrictedEditingMode",(function(){return E})),i.d(t,"RestrictedEditingModeEditing",(function(){return g})),i.d(t,"RestrictedEditingModeUI",(function(){return b})),i.d(t,"StandardEditingMode",(function(){return k})),i.d(t,"StandardEditingModeEditing",(function(){return x})),i.d(t,"StandardEditingModeUI",(function(){return w}));var n=i(0);class r extends n.Command{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=o(this.editor.model,this._direction);this.editor.model.change(t=>{t.setSelection(e)})}_checkEnabled(){return!!o(this.editor.model,this._direction)}}function o(e,t){const i=e.document.selection.getFirstPosition(),n=[];for(const r of e.markers.getMarkersGroup("restrictedEditingException")){const e=r.getRange(),o=i.isTouching(e.start)&&i.hasSameParentAs(e.start)||i.isTouching(e.end)&&i.hasSameParentAs(e.end);e.containsPosition(i)||o||("forward"===t&&e.start.isAfter(i)||"backward"===t&&e.end.isBefore(i))&&n.push(e)}return n.length?n.sort((e,i)=>"forward"===t?e.start.isAfter(i.start)?1:-1:e.start.isBefore(i.start)?1:-1).shift():null}var s=i(4);function c(e,t){for(const i of e.model.markers){if(d(i.getRange(),t)&&i.name.startsWith("restrictedEditingException:"))return i}}function d(e,t){return e.containsPosition(t)||e.end.isEqual(t)||e.start.isEqual(t)}function a(e,t,i,n){const r=c(e,t.getShiftedBy(i));return!(!r||!r.getStart().isEqual(t.getShiftedBy(i)))&&(n.updateMarker(r,{range:n.createRange(r.getStart().getShiftedBy(-i),r.getEnd())}),!0)}function l(e,t,i,n){const r=c(e,t);return!(!r||!r.getEnd().isEqual(t))&&(n.updateMarker(r,{range:n.createRange(r.getStart(),r.getEnd().getShiftedBy(i))}),!0)}class g extends n.Plugin{static get pluginName(){return"RestrictedEditingModeEditing"}constructor(e){super(e),e.config.define("restrictedEditing",{allowedCommands:["bold","italic","link","unlink"],allowedAttributes:["bold","italic","linkHref"]}),this._alwaysEnabled=new Set(["undo","redo","goToPreviousRestrictedEditingException","goToNextRestrictedEditingException"]),this._allowedInException=new Set(["input","delete","deleteForward"])}init(){const e=this.editor,t=e.editing.view;e.config.get("restrictedEditing.allowedCommands").forEach(e=>this._allowedInException.add(e)),this._setupConversion(),this._setupCommandsToggling(),this._setupRestrictions(),e.commands.add("goToPreviousRestrictedEditingException",new r(e,"backward")),e.commands.add("goToNextRestrictedEditingException",new r(e,"forward")),e.keystrokes.set("Tab",u(e,"goToNextRestrictedEditingException")),e.keystrokes.set("Shift+Tab",u(e,"goToPreviousRestrictedEditingException")),e.keystrokes.set("Ctrl+A",function(e){return(t,i)=>{const n=e.model,r=e.model.document.selection,o=c(e,r.focus);if(!o)return;const s=r.getFirstRange();(o.getRange().containsRange(s,!0)||r.isCollapsed)&&(i(),n.change(e=>{e.setSelection(o.getRange())}))}}(e)),t.change(e=>{for(const i of t.document.roots)e.addClass("ck-restricted-editing_mode_restricted",i)})}enableCommand(e){this.editor.commands.get(e).clearForceDisabled("RestrictedEditingMode"),this._alwaysEnabled.add(e)}_setupConversion(){const e=this.editor,t=e.model,i=t.document;let n=0;var r;e.conversion.for("upcast").add((r={view:{name:"span",classes:"restricted-editing-exception"},model:()=>(n++,"restrictedEditingException:"+n)},e=>e.on("element:span",(e,t,i)=>{const{writer:n}=i,o=new s.Matcher(r.view).match(t.viewItem);if(!o)return;const c=o.match;c.name=!0;const{modelRange:d}=i.convertChildren(t.viewItem,t.modelCursor);i.consumable.consume(t.viewItem,c);const a=r.model(t.viewItem),l=n.createElement("$marker",{"data-name":a}),g=n.createElement("$marker",{"data-name":a});n.insert(g,d.end),n.insert(l,d.start),t.modelRange=n.createRange(n.createPositionBefore(l),n.createPositionAfter(g)),t.modelCursor=t.modelRange.end}))),e.conversion.for("downcast").markerToHighlight({model:"restrictedEditingException",view:()=>({name:"span",classes:"restricted-editing-exception",priority:-10})}),e.conversion.for("editingDowncast").markerToElement({model:"restrictedEditingException",view:(e,{writer:t})=>t.createUIElement("span",{class:"restricted-editing-exception restricted-editing-exception_collapsed"})}),e.conversion.for("dataDowncast").markerToElement({model:"restrictedEditingException",view:(e,{writer:t})=>t.createEmptyElement("span",{class:"restricted-editing-exception"})}),i.registerPostFixer(function(e){return t=>{let i=!1;for(const n of e.model.document.differ.getChanges())"insert"==n.type&&"$text"==n.name&&(i=a(e,n.position,n.length,t)||i,i=l(e,n.position,n.length,t)||i);return!1}}(e)),i.registerPostFixer(function(e){return t=>{let i=!1;for(const{name:n,data:r}of e.model.document.differ.getChangedMarkers())n.startsWith("restrictedEditingException")&&"$graveyard"==r.newRange.root.rootName&&(t.updateMarker(n,{range:t.createRange(t.createPositionAt(r.oldRange.start))}),i=!0);return i}}(e)),t.markers.on("update:restrictedEditingException",function(e){const t=e.model;return(e,i,n,r)=>{n||r.isFlat||t.change(e=>{const t=r.start,n=r.end,o=t.path.length>n.path.length,s=o?r.start:e.createPositionAt(n.parent,0),c=o?e.createPositionAt(t.parent,"end"):r.end;e.updateMarker(i,{range:e.createRange(s,c)})})}}(e)),function(e){const t=e.editing.view,i=e.model,n=new Set;t.document.registerPostFixer(t=>{const r=i.document.selection,o=c(e,r.anchor);if(o)for(const i of e.editing.mapper.markerNameToElements(o.name))t.addClass("restricted-editing-exception_selected",i),n.add(i)}),e.conversion.for("editingDowncast").add(e=>{function i(){t.change(e=>{for(const t of n.values())e.removeClass("restricted-editing-exception_selected",t),n.delete(t)})}e.on("insert",i,{priority:"highest"}),e.on("remove",i,{priority:"highest"}),e.on("attribute",i,{priority:"highest"}),e.on("selection",i,{priority:"highest"})})}(e)}_setupRestrictions(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view.document,r=e.plugins.get("ClipboardPipeline");this.listenTo(t,"deleteContent",function(e){return(t,i)=>{const[n]=i,r=c(e,n.focus)||c(e,n.anchor);if(!r)return void t.stop();if(n.isCollapsed)return;const o=r.getRange().getIntersection(n.getFirstRange());n.is("documentSelection")?e.model.change(e=>{e.setSelection(o)}):n.setTo(o)}}(e),{priority:"high"});const o=e.commands.get("input");o&&this.listenTo(o,"execute",function(e){return(t,i)=>{const[n]=i,{range:r}=n;r&&(m(e,r)||t.stop())}}(e),{priority:"high"}),this.listenTo(r,"contentInsertion",t=>{m(e,i.getFirstRange())||t.stop()}),this.listenTo(n,"clipboardOutput",(t,n)=>{"cut"!=n.method||m(e,i.getFirstRange())||t.stop()},{priority:"high"});const s=e.config.get("restrictedEditing.allowedAttributes");t.schema.addAttributeCheck(function(e){return(t,i)=>{if(t.startsWith("$clipboardHolder"))return e.includes(i)}}(s)),t.schema.addChildCheck(p)}_setupCommandsToggling(){const e=this.editor,t=e.model.document;this._disableCommands(e),this.listenTo(t.selection,"change",this._checkCommands.bind(this)),this.listenTo(t,"change:data",this._checkCommands.bind(this))}_checkCommands(){const e=this.editor,t=e.model.document.selection;if(t.rangeCount>1)return void this._disableCommands(e);const i=c(e,t.focus);this._disableCommands(),function(e,t){if(!t)return!1;const i=t.getRange();return e.isCollapsed?d(i,e.focus):i.containsRange(e.getFirstRange(),!0)}(t,i)&&this._enableCommands(i)}_enableCommands(e){const t=this.editor,i=this._getCommandNamesToToggle(t,this._allowedInException).filter(e=>this._allowedInException.has(e)).filter((n=t.model.document.selection,r=e.getRange(),e=>!("delete"==e&&r.start.isEqual(n.focus)||"deleteForward"==e&&n.isCollapsed&&r.end.isEqual(n.focus)))).map(e=>t.commands.get(e));var n,r;for(const e of i)e.clearForceDisabled("RestrictedEditingMode")}_disableCommands(){const e=this.editor,t=this._getCommandNamesToToggle(e).map(t=>e.commands.get(t));for(const e of t)e.forceDisabled("RestrictedEditingMode")}_getCommandNamesToToggle(e){return Array.from(e.commands.names()).filter(e=>!this._alwaysEnabled.has(e))}}function u(e,t){return(i,n)=>{e.commands.get(t).isEnabled&&(e.execute(t),n())}}function m(e,t){const i=c(e,t.start),n=c(e,t.end);return i&&n&&n===i}function p(e,t){if(e.startsWith("$clipboardHolder"))return"$text"===t.name}var f=i(1),h=i(5);class b extends n.Plugin{static get pluginName(){return"RestrictedEditingModeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("restrictedEditing",i=>{const n=Object(f.createDropdown)(i),r=new h.Collection;return r.add(this._getButtonDefinition("goToPreviousRestrictedEditingException",t("Previous editable region"),"Shift+Tab")),r.add(this._getButtonDefinition("goToNextRestrictedEditingException",t("Next editable region"),"Tab")),Object(f.addListToDropdown)(n,r),n.buttonView.set({label:t("Navigate editable regions"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 6.5a3.5 3.5 0 0 1 3.495 3.308L19 10v2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5zm0-6a2 2 0 0 0-2 2v2h4v-2a2 2 0 0 0-2-2zm-9.25 8a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5z"/></svg>',tooltip:!0,isEnabled:!0,isOn:!1}),this.listenTo(n,"execute",t=>{e.execute(t.source._commandName),e.editing.view.focus()}),n})}_getButtonDefinition(e,t,i){const n=this.editor.commands.get(e),r={type:"button",model:new f.Model({label:t,withText:!0,keystroke:i,withKeystroke:!0,_commandName:e})};return r.model.bind("isEnabled").to(n,"isEnabled"),r}}i(3);class E extends n.Plugin{static get pluginName(){return"RestrictedEditingMode"}static get requires(){return[g,b]}}class v extends n.Command{refresh(){const e=this.editor.model,t=e.document;this.value=!!t.selection.getAttribute("restrictedEditingException"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"restrictedEditingException")}execute(e={}){const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{const r=t.schema.getValidRanges(i.getRanges(),"restrictedEditingException");if(i.isCollapsed)if(n)e.setSelectionAttribute("restrictedEditingException",n);else{const t=e=>e.item.getAttribute("restrictedEditingException")===this.value,n=i.focus.getLastMatchingPosition(t,{direction:"backward"}),r=i.focus.getLastMatchingPosition(t),o=i.focus;e.removeSelectionAttribute("restrictedEditingException"),o.isEqual(n)||o.isEqual(r)||e.removeAttribute("restrictedEditingException",e.createRange(n,r))}else for(const t of r)n?e.setAttribute("restrictedEditingException",n,t):e.removeAttribute("restrictedEditingException",t)})}}class x extends n.Plugin{static get pluginName(){return"StandardEditingModeEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:["restrictedEditingException"]}),e.conversion.for("upcast").elementToAttribute({model:"restrictedEditingException",view:{name:"span",classes:"restricted-editing-exception"}}),e.conversion.for("downcast").attributeToElement({model:"restrictedEditingException",view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{class:"restricted-editing-exception"},{priority:-10})}}),e.commands.add("restrictedEditingException",new v(e)),e.editing.view.change(t=>{for(const i of e.editing.view.document.roots)t.addClass("ck-restricted-editing_mode_standard",i)})}}class w extends n.Plugin{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("restrictedEditingException",i=>{const n=e.commands.get("restrictedEditingException"),r=new f.ButtonView(i);return r.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.25 16a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5zm.25 5.5a3.5 3.5 0 0 1 3.143 1.959.75.75 0 0 1-1.36.636A2 2 0 0 0 13.5 10v2H19a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5z"/></svg>',tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),r.bind("label").to(n,"value",e=>t(e?"Disable editing":"Enable editing")),this.listenTo(r,"execute",()=>{e.execute("restrictedEditingException"),e.editing.view.focus()}),r})}}class k extends n.Plugin{static get pluginName(){return"StandardEditingMode"}static get requires(){return[x,w]}}}]);
|
5
|
+
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Disable editing":"Disable editing","Enable editing":"Enable editing","Navigate editable regions":"Navigate editable regions","Next editable region":"Next editable region","Previous editable region":"Previous editable region"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),window.CKEditor5=window.CKEditor5||{},window.CKEditor5.restrictedEditing=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8)}([function(e,t,i){e.exports=i(2)("./src/core.js")},function(e,t,i){e.exports=i(2)("./src/ui.js")},function(e,t){e.exports=CKEditor5.dll},function(e,t,i){var n=i(6),r=i(7);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(r,o);e.exports=r.locals||{}},function(e,t,i){e.exports=i(2)("./src/engine.js")},function(e,t,i){e.exports=i(2)("./src/utils.js")},function(e,t,i){"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),s=[];function c(e){for(var t=-1,i=0;i<s.length;i++)if(s[i].identifier===e){t=i;break}return t}function d(e,t){for(var i={},n=[],r=0;r<e.length;r++){var o=e[r],d=t.base?o[0]+t.base:o[0],a=i[d]||0,l="".concat(d," ").concat(a);i[d]=a+1;var u=c(l),g={css:o[1],media:o[2],sourceMap:o[3]};-1!==u?(s[u].references++,s[u].updater(g)):s.push({identifier:l,updater:h(g,t),references:1}),n.push(l)}return n}function a(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var s=o(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var l,u=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function g(e,t,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,r);else{var o=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function m(e,t,i){var n=i.css,r=i.media,o=i.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,f=0;function h(e,t){var i,n,r;if(t.singleton){var o=f++;i=p||(p=a(t)),n=g.bind(null,i,o,!1),r=g.bind(null,i,o,!0)}else i=a(t),n=m.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var i=d(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var r=c(i[n]);s[r].references--}for(var o=d(e,t),a=0;a<i.length;a++){var l=c(i[a]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}i=o}}}},function(e,t){e.exports=":root{--ck-color-restricted-editing-exception-background:rgba(255,169,77,0.2);--ck-color-restricted-editing-exception-hover-background:rgba(255,169,77,0.35);--ck-color-restricted-editing-exception-brackets:rgba(204,105,0,0.4);--ck-color-restricted-editing-selected-exception-background:rgba(255,169,77,0.5);--ck-color-restricted-editing-selected-exception-brackets:rgba(204,105,0,0.6)}.ck-editor__editable .restricted-editing-exception{transition:background .2s ease-in-out;background-color:var(--ck-color-restricted-editing-exception-background);border:1px solid;border-image:linear-gradient(90deg,var(--ck-color-restricted-editing-exception-brackets) 0,var(--ck-color-restricted-editing-exception-brackets) 5px,transparent 6px,transparent calc(100% - 6px),var(--ck-color-restricted-editing-exception-brackets) calc(100% - 5px),var(--ck-color-restricted-editing-exception-brackets)) 1}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_selected{background-color:var(--ck-color-restricted-editing-selected-exception-background);border-image:linear-gradient(90deg,var(--ck-color-restricted-editing-selected-exception-brackets) 0,var(--ck-color-restricted-editing-selected-exception-brackets) 5px,var(--ck-color-restricted-editing-selected-exception-brackets) calc(100% - 5px),var(--ck-color-restricted-editing-selected-exception-brackets)) 1}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_collapsed{padding-left:1ch}.ck-restricted-editing_mode_restricted,.ck-restricted-editing_mode_restricted *{cursor:default}.ck-restricted-editing_mode_restricted .restricted-editing-exception,.ck-restricted-editing_mode_restricted .restricted-editing-exception *{cursor:text}.ck-restricted-editing_mode_restricted .restricted-editing-exception:hover{background:var(--ck-color-restricted-editing-exception-hover-background)}"},function(e,t,i){"use strict";i.r(t),i.d(t,"RestrictedEditingMode",(function(){return v})),i.d(t,"RestrictedEditingModeEditing",(function(){return u})),i.d(t,"RestrictedEditingModeUI",(function(){return E})),i.d(t,"StandardEditingMode",(function(){return _})),i.d(t,"StandardEditingModeEditing",(function(){return w})),i.d(t,"StandardEditingModeUI",(function(){return k}));var n=i(0);class r extends n.Command{constructor(e,t){super(e),this.affectsData=!1,this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=o(this.editor.model,this._direction);this.editor.model.change(t=>{t.setSelection(e)})}_checkEnabled(){return!!o(this.editor.model,this._direction)}}function o(e,t){const i=e.document.selection.getFirstPosition(),n=[];for(const r of e.markers.getMarkersGroup("restrictedEditingException")){const e=r.getRange(),o=i.isTouching(e.start)&&i.hasSameParentAs(e.start)||i.isTouching(e.end)&&i.hasSameParentAs(e.end);e.containsPosition(i)||o||("forward"===t&&e.start.isAfter(i)||"backward"===t&&e.end.isBefore(i))&&n.push(e)}return n.length?n.sort((e,i)=>"forward"===t?e.start.isAfter(i.start)?1:-1:e.start.isBefore(i.start)?1:-1).shift():null}var s=i(4);function c(e,t){for(const i of e.model.markers){if(d(i.getRange(),t)&&i.name.startsWith("restrictedEditingException:"))return i}}function d(e,t){return e.containsPosition(t)||e.end.isEqual(t)||e.start.isEqual(t)}function a(e,t,i,n){const r=c(e,t.getShiftedBy(i));return!(!r||!r.getStart().isEqual(t.getShiftedBy(i)))&&(n.updateMarker(r,{range:n.createRange(r.getStart().getShiftedBy(-i),r.getEnd())}),!0)}function l(e,t,i,n){const r=c(e,t);return!(!r||!r.getEnd().isEqual(t))&&(n.updateMarker(r,{range:n.createRange(r.getStart(),r.getEnd().getShiftedBy(i))}),!0)}class u extends n.Plugin{static get pluginName(){return"RestrictedEditingModeEditing"}constructor(e){super(e),e.config.define("restrictedEditing",{allowedCommands:["bold","italic","link","unlink"],allowedAttributes:["bold","italic","linkHref"]}),this._alwaysEnabled=new Set(["undo","redo"]),this._allowedInException=new Set(["input","delete","deleteForward"])}init(){const e=this.editor,t=e.editing.view;e.config.get("restrictedEditing.allowedCommands").forEach(e=>this._allowedInException.add(e)),this._setupConversion(),this._setupCommandsToggling(),this._setupRestrictions(),e.commands.add("goToPreviousRestrictedEditingException",new r(e,"backward")),e.commands.add("goToNextRestrictedEditingException",new r(e,"forward")),e.keystrokes.set("Tab",g(e,"goToNextRestrictedEditingException")),e.keystrokes.set("Shift+Tab",g(e,"goToPreviousRestrictedEditingException")),e.keystrokes.set("Ctrl+A",function(e){return(t,i)=>{const n=e.model,r=e.model.document.selection,o=c(e,r.focus);if(!o)return;const s=r.getFirstRange();(o.getRange().containsRange(s,!0)||r.isCollapsed)&&(i(),n.change(e=>{e.setSelection(o.getRange())}))}}(e)),t.change(e=>{for(const i of t.document.roots)e.addClass("ck-restricted-editing_mode_restricted",i)})}enableCommand(e){this.editor.commands.get(e).clearForceDisabled("RestrictedEditingMode"),this._alwaysEnabled.add(e)}_setupConversion(){const e=this.editor,t=e.model,i=t.document;let n=0;var r;e.conversion.for("upcast").add((r={view:{name:"span",classes:"restricted-editing-exception"},model:()=>(n++,"restrictedEditingException:"+n)},e=>e.on("element:span",(e,t,i)=>{const{writer:n}=i,o=new s.Matcher(r.view).match(t.viewItem);if(!o)return;const c=o.match;c.name=!0;const{modelRange:d}=i.convertChildren(t.viewItem,t.modelCursor);i.consumable.consume(t.viewItem,c);const a=r.model(t.viewItem),l=n.createElement("$marker",{"data-name":a}),u=n.createElement("$marker",{"data-name":a});n.insert(u,d.end),n.insert(l,d.start),t.modelRange=n.createRange(n.createPositionBefore(l),n.createPositionAfter(u)),t.modelCursor=t.modelRange.end}))),e.conversion.for("downcast").markerToHighlight({model:"restrictedEditingException",view:()=>({name:"span",classes:"restricted-editing-exception",priority:-10})}),e.conversion.for("editingDowncast").markerToElement({model:"restrictedEditingException",view:(e,{writer:t})=>t.createUIElement("span",{class:"restricted-editing-exception restricted-editing-exception_collapsed"})}),e.conversion.for("dataDowncast").markerToElement({model:"restrictedEditingException",view:(e,{writer:t})=>t.createEmptyElement("span",{class:"restricted-editing-exception"})}),i.registerPostFixer(function(e){return t=>{let i=!1;for(const n of e.model.document.differ.getChanges())"insert"==n.type&&"$text"==n.name&&(i=a(e,n.position,n.length,t)||i,i=l(e,n.position,n.length,t)||i);return!1}}(e)),i.registerPostFixer(function(e){return t=>{let i=!1;for(const{name:n,data:r}of e.model.document.differ.getChangedMarkers())n.startsWith("restrictedEditingException")&&r.newRange&&"$graveyard"==r.newRange.root.rootName&&(t.updateMarker(n,{range:t.createRange(t.createPositionAt(r.oldRange.start))}),i=!0);return i}}(e)),t.markers.on("update:restrictedEditingException",function(e){const t=e.model;return(e,i,n,r)=>{n||r.isFlat||t.change(e=>{const t=r.start,n=r.end,o=t.path.length>n.path.length,s=o?r.start:e.createPositionAt(n.parent,0),c=o?e.createPositionAt(t.parent,"end"):r.end;e.updateMarker(i,{range:e.createRange(s,c)})})}}(e)),function(e){const t=e.editing.view,i=e.model,n=new Set;t.document.registerPostFixer(t=>{const r=i.document.selection,o=c(e,r.anchor);if(o)for(const i of e.editing.mapper.markerNameToElements(o.name))t.addClass("restricted-editing-exception_selected",i),n.add(i)}),e.conversion.for("editingDowncast").add(e=>{function i(){t.change(e=>{for(const t of n.values())e.removeClass("restricted-editing-exception_selected",t),n.delete(t)})}e.on("insert",i,{priority:"highest"}),e.on("remove",i,{priority:"highest"}),e.on("attribute",i,{priority:"highest"}),e.on("selection",i,{priority:"highest"})})}(e)}_setupRestrictions(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view.document,r=e.plugins.get("ClipboardPipeline");this.listenTo(t,"deleteContent",function(e){return(t,i)=>{const[n]=i,r=c(e,n.focus)||c(e,n.anchor);if(!r)return void t.stop();if(n.isCollapsed)return;const o=r.getRange().getIntersection(n.getFirstRange());n.is("documentSelection")?e.model.change(e=>{e.setSelection(o)}):n.setTo(o)}}(e),{priority:"high"});const o=e.commands.get("input");o&&this.listenTo(o,"execute",function(e){return(t,i)=>{const[n]=i,{range:r}=n;r&&(p(e,r)||t.stop())}}(e),{priority:"high"}),this.listenTo(r,"contentInsertion",t=>{p(e,i.getFirstRange())||t.stop()}),this.listenTo(n,"clipboardOutput",(t,n)=>{"cut"!=n.method||p(e,i.getFirstRange())||t.stop()},{priority:"high"});const s=e.config.get("restrictedEditing.allowedAttributes");t.schema.addAttributeCheck(function(e){return(t,i)=>{if(t.startsWith("$clipboardHolder"))return e.includes(i)}}(s)),t.schema.addChildCheck(f)}_setupCommandsToggling(){const e=this.editor.model.document;this._disableCommands(),this.listenTo(e.selection,"change",this._checkCommands.bind(this)),this.listenTo(e,"change:data",this._checkCommands.bind(this))}_checkCommands(){const e=this.editor,t=e.model.document.selection;if(t.rangeCount>1)return void this._disableCommands();const i=c(e,t.focus);this._disableCommands(),function(e,t){if(!t)return!1;const i=t.getRange();return e.isCollapsed?d(i,e.focus):i.containsRange(e.getFirstRange(),!0)}(t,i)&&this._enableCommands(i)}_enableCommands(e){const t=this.editor;for(const[i,n]of t.commands)n.affectsData&&!this._alwaysEnabled.has(i)&&this._allowedInException.has(i)&&(m(i,t.model.document.selection,e.getRange())||n.clearForceDisabled("RestrictedEditingMode"))}_disableCommands(){const e=this.editor;for(const[t,i]of e.commands)i.affectsData&&!this._alwaysEnabled.has(t)&&i.forceDisabled("RestrictedEditingMode")}}function g(e,t){return(i,n)=>{e.commands.get(t).isEnabled&&(e.execute(t),n())}}function m(e,t,i){return!("delete"!=e||!i.start.isEqual(t.focus))||!("deleteForward"!=e||!t.isCollapsed||!i.end.isEqual(t.focus))}function p(e,t){const i=c(e,t.start),n=c(e,t.end);return i&&n&&n===i}function f(e,t){if(e.startsWith("$clipboardHolder"))return"$text"===t.name}var h=i(1),b=i(5);class E extends n.Plugin{static get pluginName(){return"RestrictedEditingModeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("restrictedEditing",i=>{const n=Object(h.createDropdown)(i),r=new b.Collection;return r.add(this._getButtonDefinition("goToPreviousRestrictedEditingException",t("Previous editable region"),"Shift+Tab")),r.add(this._getButtonDefinition("goToNextRestrictedEditingException",t("Next editable region"),"Tab")),Object(h.addListToDropdown)(n,r),n.buttonView.set({label:t("Navigate editable regions"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 6.5a3.5 3.5 0 0 1 3.495 3.308L19 10v2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5zm0-6a2 2 0 0 0-2 2v2h4v-2a2 2 0 0 0-2-2zm-9.25 8a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5z"/></svg>',tooltip:!0,isEnabled:!0,isOn:!1}),this.listenTo(n,"execute",t=>{e.execute(t.source._commandName),e.editing.view.focus()}),n})}_getButtonDefinition(e,t,i){const n=this.editor.commands.get(e),r={type:"button",model:new h.Model({label:t,withText:!0,keystroke:i,withKeystroke:!0,_commandName:e})};return r.model.bind("isEnabled").to(n,"isEnabled"),r}}i(3);class v extends n.Plugin{static get pluginName(){return"RestrictedEditingMode"}static get requires(){return[u,E]}}class x extends n.Command{refresh(){const e=this.editor.model,t=e.document;this.value=!!t.selection.getAttribute("restrictedEditingException"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"restrictedEditingException")}execute(e={}){const t=this.editor.model,i=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{const r=t.schema.getValidRanges(i.getRanges(),"restrictedEditingException");if(i.isCollapsed)if(n)e.setSelectionAttribute("restrictedEditingException",n);else{const t=e=>e.item.getAttribute("restrictedEditingException")===this.value,n=i.focus.getLastMatchingPosition(t,{direction:"backward"}),r=i.focus.getLastMatchingPosition(t),o=i.focus;e.removeSelectionAttribute("restrictedEditingException"),o.isEqual(n)||o.isEqual(r)||e.removeAttribute("restrictedEditingException",e.createRange(n,r))}else for(const t of r)n?e.setAttribute("restrictedEditingException",n,t):e.removeAttribute("restrictedEditingException",t)})}}class w extends n.Plugin{static get pluginName(){return"StandardEditingModeEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:["restrictedEditingException"]}),e.conversion.for("upcast").elementToAttribute({model:"restrictedEditingException",view:{name:"span",classes:"restricted-editing-exception"}}),e.conversion.for("downcast").attributeToElement({model:"restrictedEditingException",view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{class:"restricted-editing-exception"},{priority:-10})}}),e.commands.add("restrictedEditingException",new x(e)),e.editing.view.change(t=>{for(const i of e.editing.view.document.roots)t.addClass("ck-restricted-editing_mode_standard",i)})}}class k extends n.Plugin{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("restrictedEditingException",i=>{const n=e.commands.get("restrictedEditingException"),r=new h.ButtonView(i);return r.set({icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.25 16a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5zm.25 5.5a3.5 3.5 0 0 1 3.143 1.959.75.75 0 0 1-1.36.636A2 2 0 0 0 13.5 10v2H19a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5z"/></svg>',tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),r.bind("label").to(n,"value",e=>t(e?"Disable editing":"Enable editing")),this.listenTo(r,"execute",()=>{e.execute("restrictedEditingException"),e.editing.view.focus()}),r})}}class _ extends n.Plugin{static get pluginName(){return"StandardEditingMode"}static get requires(){return[w,k]}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.az=i.az||{};n.dictionary=Object.assign(n.dictionary||{},{"Disable editing":"","Enable editing":"","Navigate editable regions":"","Next editable region":"Sonrakı düzəliş olunan bölgə","Previous editable region":"Əvvəlki düzəliş olunan bölgə"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.cs=i.cs||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Zakázat úpravy","Enable editing":"Povolit úpravy","Navigate editable regions":"Procházet upravitelnými oblastmi","Next editable region":"Následující upravitelná oblast","Previous editable region":"Předchozí upravitelná oblast"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.da=e.da||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Deaktivér redigering","Enable editing":"Aktivér redigering","Navigate editable regions":"Gennemgå redigérbare regioner","Next editable region":"Næste redigérbare region","Previous editable region":"Forrige redigérbare region"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e["de-ch"]=e["de-ch"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Bearbeitung deaktivieren","Enable editing":"Bearbeitung zulassen","Navigate editable regions":"Durch bearbeitbare Bereiche navigieren","Next editable region":"Nächster bearbeitbarer Bereich","Previous editable region":"Vorheriger bearbeitbarer Bereich"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.de=e.de||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Bearbeitung deaktivieren","Enable editing":"Bearbeitung zulassen","Navigate editable regions":"Durch bearbeitbare Bereiche navigieren","Next editable region":"Nächster bearbeitbarer Bereich","Previous editable region":"Vorheriger bearbeitbarer Bereich"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e["en-au"]=e["en-au"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Disable editing","Enable editing":"Enable editing","Navigate editable regions":"Navigate editable regions","Next editable region":"Next editable region","Previous editable region":"Previous editable region"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e["en-gb"]=e["en-gb"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"","Enable editing":"Enable editing","Navigate editable regions":"Navigate editable regions","Next editable region":"Next editable region","Previous editable region":"Previous editable region"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.es=i.es||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Inhabilitar edición","Enable editing":"Habilitar edición","Navigate editable regions":"Navegar por las zonas editables","Next editable region":"Siguiente zona editable","Previous editable region":"Anterior zona editable"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.et=i.et||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Keela muutmine","Enable editing":"Luba muutmine","Navigate editable regions":"Muudetavate piirkondade vahel liikumine","Next editable region":"Järgmine muudetav piirkond","Previous editable region":"Eelmine muudetav piirkond"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.fa=i.fa||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"غیرفعال کردن ویرایش","Enable editing":"فعال کردن ویرایش","Navigate editable regions":"","Next editable region":"","Previous editable region":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.fr=i.fr||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Désactiver l'édition","Enable editing":"Activer l'édition","Navigate editable regions":"Naviguer vers","Next editable region":"Région éditable suivante","Previous editable region":"Région éditable précédente"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.gl=e.gl||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Desactivar a edición","Enable editing":"Activar a edición","Navigate editable regions":"Navegar polas áreas editábeiss","Next editable region":"Seguinte área editábel","Previous editable region":"Área editábel anterior"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.hi=i.hi||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Disable editing","Enable editing":"Enable editing","Navigate editable regions":"Navigate editable regions","Next editable region":"Next editable region","Previous editable region":"Previous editable region"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.hr=e.hr||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Onemogući uređivanje","Enable editing":"Omogući uređivanje","Navigate editable regions":"Navigiraj regijama koje je moguće uređivati","Next editable region":"Sljedeća regija koju je moguće uređivati","Previous editable region":"Prethodna regija koju je moguće uređivati"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const t=e.hu=e.hu||{};t.dictionary=Object.assign(t.dictionary||{},{"Disable editing":"Szerkesztés letiltása","Enable editing":"Szerkesztés engedélyezése","Navigate editable regions":"Szerkeszthető területek navigálása","Next editable region":"Következő szerkeszthető terület","Previous editable region":"Előző szerkeszthető terület"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const i=n.id=n.id||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Nonaktifkan penyuntingan","Enable editing":"Aktifkan penyuntingan","Navigate editable regions":"Posisikan bagian-bagian penyuntingan","Next editable region":"Bagian penyuntingan berikutnya","Previous editable region":"Bagian penyuntingan sebelumnya"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.it=i.it||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Disabilita modifica","Enable editing":"Abilita modifica","Navigate editable regions":"Spostati tra regioni modificabili","Next editable region":"Regione modificabile successiva","Previous editable region":"Regione modificabile precedente"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.ko=i.ko||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"편집 비활성화","Enable editing":"편집 활성화","Navigate editable regions":"편집 가능한 구역 탐색","Next editable region":"다음 편집 가능한 구역","Previous editable region":"이전 편집 가능한 구역"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.ku=i.ku||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"لەکارخستنی جاکسازی","Enable editing":"بەکارخستنی چاکسازی","Navigate editable regions":"چوون بۆ ناوچەی چاکسازی","Next editable region":"ناوچەی چاکسازی داهاتوو","Previous editable region":"ناوچەی چاکسازی پێشوو"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const a=i.lv=i.lv||{};a.dictionary=Object.assign(a.dictionary||{},{"Disable editing":"Atspējot labošanu","Enable editing":"Iespējot labošanu","Navigate editable regions":"Navigēt caur labojamajiem reģioniem","Next editable region":"Nākamais labošanas reģions","Previous editable region":"Iepriekšējais labošanas reģions"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.nl=e.nl||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Bewerken uitschakelen","Enable editing":"Bewerken inschakelen","Navigate editable regions":"Navigeer bewerkbare gebieden","Next editable region":"Volgend bewerkbaar gebied","Previous editable region":"Vorig bewerkbaar gebied"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.no=e.no||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Deaktivere redigering","Enable editing":"Aktivere redigering","Navigate editable regions":"Naviger redigerbare regioner","Next editable region":"Neste redigerbare region","Previous editable region":"Forrige redigerbare region"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.pl=e.pl||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Zablokuj edycję","Enable editing":"Odblokuj edycję","Navigate editable regions":"Przejdź między polami do edycji","Next editable region":"Następne pole do edycji","Previous editable region":"Poprzednie pole do edycji"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i["pt-br"]=i["pt-br"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Desabilitar edição","Enable editing":"Habilitar edição","Navigate editable regions":"Navegar entre as regiões editáveis","Next editable region":"Ir para próxima região editável","Previous editable region":"Ir para região editável anterior"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.ro=e.ro||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Dezactivează editarea","Enable editing":"Activează editarea","Navigate editable regions":"Navighează la regiunile editabile","Next editable region":"Regiunea editabilă următoare","Previous editable region":"Regiunea editabilă precedentă"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.ru=i.ru||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Отключить редактирование","Enable editing":"Разрешить редактирование","Navigate editable regions":"Навигация по редактируемым регионам","Next editable region":"Следующий редактируемый регион","Previous editable region":"Предыдущий редактируемый регион"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const a=i.sk=i.sk||{};a.dictionary=Object.assign(a.dictionary||{},{"Disable editing":"Vypnúť režim úprav","Enable editing":"Zapnúť režim úprav","Navigate editable regions":"Navigácia v oblasti úprav","Next editable region":"Nasledujúca oblasť úprav","Previous editable region":"Predchádzajúca oblasť úprav"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e["sr-latn"]=e["sr-latn"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Nemoguće uređivanje","Enable editing":"Omogući uređivanje","Navigate editable regions":"Pronađi regije za uređivanje","Next editable region":"Sledeća regija za uređivanje","Previous editable region":"Prethodna regija za uređivanje"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.sr=i.sr||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Немогуће уређивање","Enable editing":"Омогући уређивање","Navigate editable regions":"Пронђи регије за уређивање","Next editable region":"Следећа регија за уређивање","Previous editable region":"Претходна регија за уређивање"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.tk=i.tk||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Redaktirlemegi öçüriň","Enable editing":"Redaktirlemegi işjeňleşdiriň","Navigate editable regions":"Düzedip bolýan sebitlere geçiň","Next editable region":"Indiki redaktirläp bolýan sebit","Previous editable region":"Öňki redaktirläp bolýan sebit"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const i=e.tr=e.tr||{};i.dictionary=Object.assign(i.dictionary||{},{"Disable editing":"Düzenlemeyi devre dışı bırak","Enable editing":"Düzenlemeyi etkinleştir","Navigate editable regions":"Düzenlenebilir alanlara git","Next editable region":"Sonraki düzenlenebilir alan","Previous editable region":"Önceki düzenlenebilir alan"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.uk=i.uk||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"Вимкнути редагування","Enable editing":"Увімкнути редагування","Navigate editable regions":"Навігація по областях редагування","Next editable region":"Наступна область редагування","Previous editable region":"Попередня область редагування"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i["zh-cn"]=i["zh-cn"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"禁用编辑","Enable editing":"允许编辑","Navigate editable regions":"导航至可编辑区域","Next editable region":"下一个可编辑区域","Previous editable region":"上一个可编辑区域"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const e=i.zh=i.zh||{};e.dictionary=Object.assign(e.dictionary||{},{"Disable editing":"停用編輯","Enable editing":"啟用編輯","Navigate editable regions":"編輯區域導航","Next editable region":"下一個可編輯區域","Previous editable region":"上一個可編輯區域"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"plugins": [
|
3
|
+
{
|
4
|
+
"name": "Restricted editing mode",
|
5
|
+
"className": "RestrictedEditingMode",
|
6
|
+
"description": "Enables defining which parts of a document can be editable for users with restricted editing rights. It allows you to edit only within the created editable areas.",
|
7
|
+
"docs": "features/restricted-editing.html",
|
8
|
+
"path": "src/restrictededitingmode.js",
|
9
|
+
"uiComponents": [
|
10
|
+
{
|
11
|
+
"type": "SplitButton",
|
12
|
+
"name": "restrictedEditing",
|
13
|
+
"iconPath": "theme/icons/contentlock.svg"
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"htmlOutput": [
|
17
|
+
{
|
18
|
+
"elements": "span",
|
19
|
+
"classes": "restricted-editing-exception"
|
20
|
+
}
|
21
|
+
]
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"name": "Standard editing mode",
|
25
|
+
"className": "StandardEditingMode",
|
26
|
+
"description": "Enables freely editing the document and defining which parts can be editable for users with restricted editing rights. It allows you to create editable areas.",
|
27
|
+
"docs": "features/restricted-editing.html#running-the-standard-editing-mode",
|
28
|
+
"path": "src/standardeditingmode.js",
|
29
|
+
"uiComponents": [
|
30
|
+
{
|
31
|
+
"type": "Button",
|
32
|
+
"name": "restrictedEditingException",
|
33
|
+
"iconPath": "theme/icons/contentunlock.svg"
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"htmlOutput": [
|
37
|
+
{
|
38
|
+
"elements": "span",
|
39
|
+
"classes": "restricted-editing-exception"
|
40
|
+
}
|
41
|
+
]
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
package/package.json
CHANGED
@@ -1,33 +1,34 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-restricted-editing",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
3
|
+
"version": "31.0.0",
|
4
|
+
"description": "Restricted editing feature for CKEditor 5 editors.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
7
7
|
"ckeditor5",
|
8
8
|
"ckeditor 5",
|
9
|
-
"ckeditor5-lib"
|
9
|
+
"ckeditor5-lib",
|
10
|
+
"ckeditor5-dll"
|
10
11
|
],
|
11
12
|
"main": "src/index.js",
|
12
13
|
"dependencies": {
|
13
|
-
"ckeditor5": "^
|
14
|
+
"ckeditor5": "^31.0.0"
|
14
15
|
},
|
15
16
|
"devDependencies": {
|
16
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
17
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
18
|
-
"@ckeditor/ckeditor5-clipboard": "^
|
19
|
-
"@ckeditor/ckeditor5-core": "^
|
20
|
-
"@ckeditor/ckeditor5-dev-utils": "^25.
|
21
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
22
|
-
"@ckeditor/ckeditor5-engine": "^
|
23
|
-
"@ckeditor/ckeditor5-link": "^
|
24
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
25
|
-
"@ckeditor/ckeditor5-table": "^
|
26
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
27
|
-
"@ckeditor/ckeditor5-typing": "^
|
28
|
-
"@ckeditor/ckeditor5-ui": "^
|
29
|
-
"@ckeditor/ckeditor5-undo": "^
|
30
|
-
"@ckeditor/ckeditor5-utils": "^
|
17
|
+
"@ckeditor/ckeditor5-basic-styles": "^31.0.0",
|
18
|
+
"@ckeditor/ckeditor5-block-quote": "^31.0.0",
|
19
|
+
"@ckeditor/ckeditor5-clipboard": "^31.0.0",
|
20
|
+
"@ckeditor/ckeditor5-core": "^31.0.0",
|
21
|
+
"@ckeditor/ckeditor5-dev-utils": "^25.4.0",
|
22
|
+
"@ckeditor/ckeditor5-editor-classic": "^31.0.0",
|
23
|
+
"@ckeditor/ckeditor5-engine": "^31.0.0",
|
24
|
+
"@ckeditor/ckeditor5-link": "^31.0.0",
|
25
|
+
"@ckeditor/ckeditor5-paragraph": "^31.0.0",
|
26
|
+
"@ckeditor/ckeditor5-table": "^31.0.0",
|
27
|
+
"@ckeditor/ckeditor5-theme-lark": "^31.0.0",
|
28
|
+
"@ckeditor/ckeditor5-typing": "^31.0.0",
|
29
|
+
"@ckeditor/ckeditor5-ui": "^31.0.0",
|
30
|
+
"@ckeditor/ckeditor5-undo": "^31.0.0",
|
31
|
+
"@ckeditor/ckeditor5-utils": "^31.0.0",
|
31
32
|
"webpack": "^4.43.0",
|
32
33
|
"webpack-cli": "^3.3.11"
|
33
34
|
},
|
@@ -48,7 +49,8 @@
|
|
48
49
|
"lang",
|
49
50
|
"src",
|
50
51
|
"theme",
|
51
|
-
"build"
|
52
|
+
"build",
|
53
|
+
"ckeditor5-metadata.json"
|
52
54
|
],
|
53
55
|
"scripts": {
|
54
56
|
"dll:build": "webpack"
|
@@ -54,7 +54,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
|
|
54
54
|
* @type {Set.<String>}
|
55
55
|
* @private
|
56
56
|
*/
|
57
|
-
this._alwaysEnabled = new Set( [ 'undo', 'redo'
|
57
|
+
this._alwaysEnabled = new Set( [ 'undo', 'redo' ] );
|
58
58
|
|
59
59
|
/**
|
60
60
|
* Commands allowed in non-restricted areas.
|
@@ -241,7 +241,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
|
|
241
241
|
const model = editor.model;
|
242
242
|
const doc = model.document;
|
243
243
|
|
244
|
-
this._disableCommands(
|
244
|
+
this._disableCommands();
|
245
245
|
|
246
246
|
this.listenTo( doc.selection, 'change', this._checkCommands.bind( this ) );
|
247
247
|
this.listenTo( doc, 'change:data', this._checkCommands.bind( this ) );
|
@@ -257,7 +257,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
|
|
257
257
|
const selection = editor.model.document.selection;
|
258
258
|
|
259
259
|
if ( selection.rangeCount > 1 ) {
|
260
|
-
this._disableCommands(
|
260
|
+
this._disableCommands();
|
261
261
|
|
262
262
|
return;
|
263
263
|
}
|
@@ -280,12 +280,21 @@ export default class RestrictedEditingModeEditing extends Plugin {
|
|
280
280
|
_enableCommands( marker ) {
|
281
281
|
const editor = this.editor;
|
282
282
|
|
283
|
-
const
|
284
|
-
|
285
|
-
|
286
|
-
|
283
|
+
for ( const [ commandName, command ] of editor.commands ) {
|
284
|
+
if ( !command.affectsData || this._alwaysEnabled.has( commandName ) ) {
|
285
|
+
continue;
|
286
|
+
}
|
287
|
+
|
288
|
+
// Enable ony those commands that are allowed in the exception marker.
|
289
|
+
if ( !this._allowedInException.has( commandName ) ) {
|
290
|
+
continue;
|
291
|
+
}
|
292
|
+
|
293
|
+
// Do not enable 'delete' and 'deleteForward' commands on the exception marker boundaries.
|
294
|
+
if ( isDeleteCommandOnMarkerBoundaries( commandName, editor.model.document.selection, marker.getRange() ) ) {
|
295
|
+
continue;
|
296
|
+
}
|
287
297
|
|
288
|
-
for ( const command of commands ) {
|
289
298
|
command.clearForceDisabled( COMMAND_FORCE_DISABLE_ID );
|
290
299
|
}
|
291
300
|
}
|
@@ -297,25 +306,15 @@ export default class RestrictedEditingModeEditing extends Plugin {
|
|
297
306
|
*/
|
298
307
|
_disableCommands() {
|
299
308
|
const editor = this.editor;
|
300
|
-
const commands = this._getCommandNamesToToggle( editor )
|
301
|
-
.map( name => editor.commands.get( name ) );
|
302
309
|
|
303
|
-
for ( const command of commands ) {
|
310
|
+
for ( const [ commandName, command ] of editor.commands ) {
|
311
|
+
if ( !command.affectsData || this._alwaysEnabled.has( commandName ) ) {
|
312
|
+
continue;
|
313
|
+
}
|
314
|
+
|
304
315
|
command.forceDisabled( COMMAND_FORCE_DISABLE_ID );
|
305
316
|
}
|
306
317
|
}
|
307
|
-
|
308
|
-
/**
|
309
|
-
* Returns command names that should be toggleable.
|
310
|
-
*
|
311
|
-
* @param {module:core/editor/editor~Editor} editor
|
312
|
-
* @returns {Array.<String>}
|
313
|
-
* @private
|
314
|
-
*/
|
315
|
-
_getCommandNamesToToggle( editor ) {
|
316
|
-
return Array.from( editor.commands.names() )
|
317
|
-
.filter( name => !this._alwaysEnabled.has( name ) );
|
318
|
-
}
|
319
318
|
}
|
320
319
|
|
321
320
|
// Helper method for executing enabled commands only.
|
@@ -357,24 +356,22 @@ function getSelectAllHandler( editor ) {
|
|
357
356
|
};
|
358
357
|
}
|
359
358
|
|
360
|
-
// Additional
|
359
|
+
// Additional rule for enabling "delete" and "deleteForward" commands if selection is on range boundaries:
|
361
360
|
//
|
362
361
|
// Does not allow to enable command when selection focus is:
|
363
362
|
// - is on marker start - "delete" - to prevent removing content before marker
|
364
363
|
// - is on marker end - "deleteForward" - to prevent removing content after marker
|
365
|
-
function
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
}
|
370
|
-
|
371
|
-
// Only for collapsed selection - non-collapsed selection that extends over a marker is handled elsewhere.
|
372
|
-
if ( name == 'deleteForward' && selection.isCollapsed && markerRange.end.isEqual( selection.focus ) ) {
|
373
|
-
return false;
|
374
|
-
}
|
364
|
+
function isDeleteCommandOnMarkerBoundaries( commandName, selection, markerRange ) {
|
365
|
+
if ( commandName == 'delete' && markerRange.start.isEqual( selection.focus ) ) {
|
366
|
+
return true;
|
367
|
+
}
|
375
368
|
|
369
|
+
// Only for collapsed selection - non-collapsed selection that extends over a marker is handled elsewhere.
|
370
|
+
if ( commandName == 'deleteForward' && selection.isCollapsed && markerRange.end.isEqual( selection.focus ) ) {
|
376
371
|
return true;
|
377
|
-
}
|
372
|
+
}
|
373
|
+
|
374
|
+
return false;
|
378
375
|
}
|
379
376
|
|
380
377
|
// Ensures that model.deleteContent() does not delete outside exception markers ranges.
|
@@ -24,6 +24,9 @@ export default class RestrictedEditingModeNavigationCommand extends Command {
|
|
24
24
|
constructor( editor, direction ) {
|
25
25
|
super( editor );
|
26
26
|
|
27
|
+
// It does not affect data so should be enabled in read-only mode and in restricted editing mode.
|
28
|
+
this.affectsData = false;
|
29
|
+
|
27
30
|
/**
|
28
31
|
* The direction of the command. Can be `'forward'` or `'backward'`.
|
29
32
|
*
|
package/CHANGELOG.md
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
Changelog
|
2
|
-
=========
|
3
|
-
|
4
|
-
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
|
5
|
-
|
6
|
-
Changes for the past releases are available below.
|
7
|
-
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-restricted-editing/compare/v18.0.0...v19.0.0) (2020-04-29)
|
9
|
-
|
10
|
-
### Other changes
|
11
|
-
|
12
|
-
* Updated translations. ([4d7336d](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/4d7336d))
|
13
|
-
|
14
|
-
|
15
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-restricted-editing/compare/v17.0.0...v18.0.0) (2020-03-19)
|
16
|
-
|
17
|
-
### Other changes
|
18
|
-
|
19
|
-
* Updated translations. ([e2a6a7d](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/e2a6a7d))
|
20
|
-
|
21
|
-
|
22
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-restricted-editing/compare/v16.0.0...v17.0.0) (2020-02-19)
|
23
|
-
|
24
|
-
### MAJOR BREAKING CHANGES
|
25
|
-
|
26
|
-
* Changed the class denoting the exception spans from `ck-restricted-editing-exception` to `restricted-editing-exception`. See [ckeditor/ckeditor5-restricted-editing#6](https://github.com/ckeditor/ckeditor5-restricted-editing/pull/6).
|
27
|
-
|
28
|
-
The data produced by version 16.0.0 of this package will not be recognized by the new version of this package. The easiest migration method is to replace all occurrences of `class="ck-restricted-editing-exception"` with `class="restricted-editing-exception"` prior to loading the data into the editor.
|
29
|
-
|
30
|
-
### Features
|
31
|
-
|
32
|
-
* Add `enableCommand()` method to `RestrictedEditingModeEditing`. Closes [ckeditor/ckeditor5#6041](https://github.com/ckeditor/ckeditor5/issues/6041). Closes [ckeditor/ckeditor5#6011](https://github.com/ckeditor/ckeditor5/issues/6011). ([e617559](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/e617559))
|
33
|
-
* Allow pasting content into exception areas in the restricted editing mode. Closes [ckeditor/ckeditor5#5802](https://github.com/ckeditor/ckeditor5/issues/5802). ([6704d21](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/6704d21))
|
34
|
-
* Pressing Ctrl+A when the selection range is inside an exception selects text only within an exception in restricted editing. Second Ctrl+A selects the entire text in the editor. Closes [ckeditor/ckeditor5#5826](https://github.com/ckeditor/ckeditor5/issues/5826). ([569d588](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/569d588))
|
35
|
-
* Remove the entire exception when collapsed selection is inside text with restricted attribute. Closes [#5828](https://github.com/ckeditor/ckeditor5-restricted-editing/issues/5828). ([44f443e](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/44f443e))
|
36
|
-
|
37
|
-
### Bug fixes
|
38
|
-
|
39
|
-
* Fix non-flat exception markers. Closes [ckeditor/ckeditor5#6003](https://github.com/ckeditor/ckeditor5/issues/6003). ([70e3e12](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/70e3e12))
|
40
|
-
* Focus the editor before executing toolbar buttons' command. See [ckeditor/ckeditor5#353](https://github.com/ckeditor/ckeditor5/issues/353). ([e7f9d23](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/e7f9d23))
|
41
|
-
* Pressing "Tab" or "Shift+Tab" should move focus outside the editor in restricted mode if the selection is anchored in the last (or first) exception. Closes [ckeditor/ckeditor5#5834](https://github.com/ckeditor/ckeditor5/issues/5834). ([dc26f4c](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/dc26f4c))
|
42
|
-
* Restricted editing boundaries should not be crossed by delete content and input command. Closes [ckeditor/ckeditor5#5840](https://github.com/ckeditor/ckeditor5/issues/5840). ([3ae681a](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/3ae681a))
|
43
|
-
|
44
|
-
### Other changes
|
45
|
-
|
46
|
-
* Added CSS classes to the editable elements to differentiate between the restricted and standard modes. See [ckeditor/ckeditor5#5829](https://github.com/ckeditor/ckeditor5/issues/5829). ([de38be8](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/de38be8))
|
47
|
-
* Align CSS class names to the changes in the restricted editing feature. See [ckeditor/ckeditor5#5899](https://github.com/ckeditor/ckeditor5/issues/5899). ([3ba00b0](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/3ba00b0))
|
48
|
-
* Updated translations. ([c076842](https://github.com/ckeditor/ckeditor5-restricted-editing/commit/c076842))
|
49
|
-
|
50
|
-
|
51
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-restricted-editing/tree/v16.0.0) (2019-12-04)
|
52
|
-
|
53
|
-
The initial release.
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["webpack://CKEditor5.restrictedEditing/webpack/bootstrap","webpack://CKEditor5.restrictedEditing/./theme/restrictedediting.css","webpack://CKEditor5.restrictedEditing//Users/pomek/Projects/ckeditor/ckeditor5/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://CKEditor5.restrictedEditing/./src/index.js","webpack://CKEditor5.restrictedEditing/./src/restrictededitingexceptioncommand.js","webpack://CKEditor5.restrictedEditing/./src/restrictededitingmode.js","webpack://CKEditor5.restrictedEditing/./src/restrictededitingmode/converters.js","webpack://CKEditor5.restrictedEditing/./src/restrictededitingmode/utils.js","webpack://CKEditor5.restrictedEditing/./src/restrictededitingmodeediting.js","webpack://CKEditor5.restrictedEditing/./src/restrictededitingmodenavigationcommand.js","webpack://CKEditor5.restrictedEditing/./src/restrictededitingmodeui.js","webpack://CKEditor5.restrictedEditing/./src/standardeditingmode.js","webpack://CKEditor5.restrictedEditing/./src/standardeditingmodeediting.js","webpack://CKEditor5.restrictedEditing/./src/standardeditingmodeui.js","webpack://CKEditor5.restrictedEditing/./theme/icons/contentlock.svg","webpack://CKEditor5.restrictedEditing/./theme/icons/contentunlock.svg","webpack://CKEditor5.restrictedEditing/./theme/restrictedediting.css?92b8","webpack://CKEditor5.restrictedEditing/delegated ./core.js from dll-reference CKEditor5.dll","webpack://CKEditor5.restrictedEditing/delegated ./engine.js from dll-reference CKEditor5.dll","webpack://CKEditor5.restrictedEditing/delegated ./ui.js from dll-reference CKEditor5.dll","webpack://CKEditor5.restrictedEditing/delegated ./utils.js from dll-reference CKEditor5.dll","webpack://CKEditor5.restrictedEditing/external \"CKEditor5.dll\""],"names":[],"mappings":";;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA,wBAAwB,wEAAwE,+EAA+E,qEAAqE,iFAAiF,8EAA8E,mDAAmD,sCAAsC,yEAAyE,iBAAiB,kUAAkU,yFAAyF,kFAAkF,yTAAyT,0FAA0F,iBAAiB,gFAAgF,eAAe,4IAA4I,YAAY,2EAA2E,yEAAyE,C;;;;;;;;;;;;ACAr1D;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,KAAwC,GAAG,sBAAiB,GAAG,SAAI;;AAEnF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,qEAAqE,qBAAqB,aAAa;;AAEvG;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,yDAAyD;AACzD,GAAG;;AAEH;;;AAGA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB,6BAA6B;AACjD;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;;;;;;;AC5QA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4D;AACc;AACV;AACR;AACc;AACV;;AAE7C;AACf,CAAC,qFAAqB;AACtB,CAAC,mGAA4B;AAC7B,CAAC,yFAAuB;AACxB,CAAC,iFAAmB;AACpB,CAAC,+FAA0B;AAC3B,CAAC,qFAAqB;AACtB,CAAC,EAAC;;;;;;;;;;;;;ACvBF;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;;AAE7C;AACA;AACA;AACe,gDAAgD,0DAAO;AACtE;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,uFAAuF,wBAAwB;AAC/G;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;ACjEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAE8B;AACV;;AAExB;;AAExC;AACA;AACA;AACA;AACA;AACA,UAAU,0HAA0H;AACpI,UAAU,2GAA2G;AACrH;AACA;AACA;AACe,oCAAoC,yDAAM;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,qEAA4B,EAAE,gEAAuB;AAChE;AACA;;AAEA;AACA;AACA,IAAI,4EAA4E;AAChF;AACA,iBAAiB,kFAAkF;AACnG;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,8BAA8B,4EAA4E;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ,sEAAsE;AAC9E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wGAAwG;AAC5G;AACA,YAAY,eAAe;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;;;;;;;;;;;;;ACtGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE+C;;AAED;;AAE9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,qEAAqE;AAC5E;AACA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,kEAAmB;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,6CAA6C,sBAAsB;AACnE,6CAA6C,sBAAsB;AACnE,gDAAgD,sBAAsB;AACtE,gDAAgD,sBAAsB;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C,aAAa;AACb;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C,aAAa;AACb;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,0CAA0C;AACrD;AACA,WAAW,oDAAoD;AAC/D;AACA,WAAW,uCAAuC;AAClD;AACO;AACP;AACA,SAAS,SAAS;;AAElB,sBAAsB,4DAAO;AAC7B;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,SAAS,qCAAqC;AAC9C;;AAEA;AACA,4DAA4D,0BAA0B;AACtF,0DAA0D,0BAA0B;;AAEpF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA,uBAAuB,kEAAmB;;AAE1C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,kEAAmB;;AAExC;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;;;;;;;;;;;;AC9LA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI,iFAAiF;AACrF;AACA;AACA,WAAW,iCAAiC;AAC5C,WAAW,sCAAsC;AACjD,aAAa,sDAAsD;AACnE;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C,WAAW,sCAAsC;AACjD,aAAa;AACb;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,WAAW,4CAA4C;AACvD,aAAa;AACb;AACO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACrEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAE8C;AAM9C;AAC6C;;AAEzF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,2CAA2C,yDAAM;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,qEAAqE,+EAAkC;AACvG,iEAAiE,+EAAkC;AACnG;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,kGAAkG;AACvG;AACA,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yCAAyC,iGAAuB;AAChE;AACA;AACA;AACA,IAAI;AACJ;AACA,mBAAmB;;AAEnB,yCAAyC,eAAe;AACxD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH,yBAAyB,uGAA6B;AACtD,yBAAyB,2GAAiC;AAC1D;;AAEA,EAAE,oGAA0B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2EAA2E,mBAAmB;;AAE9F;;AAEA;AACA;AACA;AACA,sFAAsF,mBAAmB;AACzG;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG,mBAAmB;;AAEzB;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG,mBAAmB;;AAEzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAiB,wFAAmB;;AAEpC;;AAEA,OAAO,wFAAmB;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,4CAA4C;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,iCAAiC;AAC7C,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wFAAmB;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,wFAAmB,+BAA+B,wFAAmB;;AAEtF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ;;AAEjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wFAAmB;AAC1C,qBAAqB,wFAAmB;;AAExC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACreA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;;AAE7C;AACA;AACA;AACA;AACA;AACe,qDAAqD,0DAAO;AAC3E;AACA;AACA;AACA,YAAY,iCAAiC;AAC7C,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gCAAgC;AAC3C,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF;;;;;;;;;;;;;ACpHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACgC;AAC3B;;AAEK;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,sCAAsC,yDAAM;AAC3D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,uEAAc;AACtC,yBAAyB,8DAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG,0EAAiB;;AAEpB;AACA;AACA,UAAU,oEAAQ;AAClB;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sDAAK;AACnB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACnGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAE0B;AACV;;AAEpB;;AAExC;AACA;AACA;AACA;AACA;AACA,UAAU,oHAAoH;AAC9H,UAAU,qGAAqG;AAC/G;AACA;AACA;AACe,kCAAkC,yDAAM;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,mEAA0B,EAAE,8DAAqB;AAC5D;AACA;;;;;;;;;;;;;ACrCA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEwC;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,yCAAyC,yDAAM;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC,oDAAoD;;AAE5F;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,iCAAiC,SAAS;AAC1C;AACA;AACA,oDAAoD,wCAAwC,GAAG,gBAAgB;AAC/G;AACA;AACA,GAAG;;AAEH,yDAAyD,0EAAiC;;AAE1F;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;AChEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACE;;AAEY;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACe,oCAAoC,yDAAM;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,2DAAU;;AAE9B;AACA,UAAU,sEAAU;AACpB;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;ACpDA;AAAe,inBAAkjB,E;;;;;;;;;;;;ACAjkB;AAAe,4mBAA6iB,E;;;;;;;;;;;ACA5jB,UAAU,mBAAO,CAAC,6JAA8E;AAChG,0BAA0B,mBAAO,CAAC,kKAAuF;;AAEzH;;AAEA;AACA,0BAA0B,QAAS;AACnC;;AAEA,eAAe,+CAA+C;;AAE9D;AACA;;AAEA;;;;AAIA,sC;;;;;;;;;;;AClBA,0H;;;;;;;;;;;ACAA,4H;;;;;;;;;;;ACAA,wH;;;;;;;;;;;ACAA,2H;;;;;;;;;;;ACAA,+B","file":"restricted-editing.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","module.exports = \":root{--ck-color-restricted-editing-exception-background:rgba(255,169,77,0.2);--ck-color-restricted-editing-exception-hover-background:rgba(255,169,77,0.35);--ck-color-restricted-editing-exception-brackets:rgba(204,105,0,0.4);--ck-color-restricted-editing-selected-exception-background:rgba(255,169,77,0.5);--ck-color-restricted-editing-selected-exception-brackets:rgba(204,105,0,0.6)}.ck-editor__editable .restricted-editing-exception{transition:background .2s ease-in-out;background-color:var(--ck-color-restricted-editing-exception-background);border:1px solid;border-image:linear-gradient(90deg,var(--ck-color-restricted-editing-exception-brackets) 0,var(--ck-color-restricted-editing-exception-brackets) 5px,transparent 6px,transparent calc(100% - 6px),var(--ck-color-restricted-editing-exception-brackets) calc(100% - 5px),var(--ck-color-restricted-editing-exception-brackets)) 1}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_selected{background-color:var(--ck-color-restricted-editing-selected-exception-background);border-image:linear-gradient(90deg,var(--ck-color-restricted-editing-selected-exception-brackets) 0,var(--ck-color-restricted-editing-selected-exception-brackets) 5px,var(--ck-color-restricted-editing-selected-exception-brackets) calc(100% - 5px),var(--ck-color-restricted-editing-selected-exception-brackets)) 1}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_collapsed{padding-left:1ch}.ck-restricted-editing_mode_restricted,.ck-restricted-editing_mode_restricted *{cursor:default}.ck-restricted-editing_mode_restricted .restricted-editing-exception,.ck-restricted-editing_mode_restricted .restricted-editing-exception *{cursor:text}.ck-restricted-editing_mode_restricted .restricted-editing-exception:hover{background:var(--ck-color-restricted-editing-exception-hover-background)}\"","\"use strict\";\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && typeof btoa !== 'undefined') {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing\n */\n\nimport RestrictedEditingMode from './restrictededitingmode';\nimport RestrictedEditingModeEditing from './restrictededitingmodeediting';\nimport RestrictedEditingModeUI from './restrictededitingmodeui';\nimport StandardEditingMode from './standardeditingmode';\nimport StandardEditingModeEditing from './standardeditingmodeediting';\nimport StandardEditingModeUI from './standardeditingmodeui';\n\nexport default {\n\tRestrictedEditingMode,\n\tRestrictedEditingModeEditing,\n\tRestrictedEditingModeUI,\n\tStandardEditingMode,\n\tStandardEditingModeEditing,\n\tStandardEditingModeUI\n};\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/restrictededitingexceptioncommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\n\n/**\n * @extends module:core/command~Command\n */\nexport default class RestrictedEditingExceptionCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis.value = !!doc.selection.getAttribute( 'restrictedEditingException' );\n\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection( doc.selection, 'restrictedEditingException' );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\texecute( options = {} ) {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selection = document.selection;\n\t\tconst valueToSet = ( options.forceValue === undefined ) ? !this.value : options.forceValue;\n\n\t\tmodel.change( writer => {\n\t\t\tconst ranges = model.schema.getValidRanges( selection.getRanges(), 'restrictedEditingException' );\n\n\t\t\tif ( selection.isCollapsed ) {\n\t\t\t\tif ( valueToSet ) {\n\t\t\t\t\twriter.setSelectionAttribute( 'restrictedEditingException', valueToSet );\n\t\t\t\t} else {\n\t\t\t\t\tconst isSameException = value => value.item.getAttribute( 'restrictedEditingException' ) === this.value;\n\t\t\t\t\tconst exceptionStart = selection.focus.getLastMatchingPosition( isSameException, { direction: 'backward' } );\n\t\t\t\t\tconst exceptionEnd = selection.focus.getLastMatchingPosition( isSameException );\n\t\t\t\t\tconst focus = selection.focus;\n\n\t\t\t\t\twriter.removeSelectionAttribute( 'restrictedEditingException' );\n\n\t\t\t\t\tif ( !( focus.isEqual( exceptionStart ) || focus.isEqual( exceptionEnd ) ) ) {\n\t\t\t\t\t\twriter.removeAttribute( 'restrictedEditingException', writer.createRange( exceptionStart, exceptionEnd ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( const range of ranges ) {\n\t\t\t\t\tif ( valueToSet ) {\n\t\t\t\t\t\twriter.setAttribute( 'restrictedEditingException', valueToSet, range );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.removeAttribute( 'restrictedEditingException', range );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/restrictededitingmode\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport RestrictedEditingModeEditing from './restrictededitingmodeediting';\nimport RestrictedEditingModeUI from './restrictededitingmodeui';\n\nimport '../theme/restrictedediting.css';\n\n/**\n * The restricted editing mode plugin.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * The {@link module:restricted-editing/restrictededitingmodeediting~RestrictedEditingModeEditing restricted mode editing feature}.\n * * The {@link module:restricted-editing/restrictededitingmodeui~RestrictedEditingModeUI restricted mode UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class RestrictedEditingMode extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'RestrictedEditingMode';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ RestrictedEditingModeEditing, RestrictedEditingModeUI ];\n\t}\n}\n\n/**\n * The configuration of the restricted editing mode feature. Introduced by the\n * {@link module:restricted-editing/restrictededitingmode~RestrictedEditingMode} feature.\n *\n * Read more in {@link module:restricted-editing/restrictededitingmode~RestrictedEditingModeConfig}.\n *\n * @member {module:restricted-editing/restrictededitingmode~RestrictedEditingModeConfig}\n * module:core/editor/editorconfig~EditorConfig#restrictedEditing\n */\n\n/**\n * The configuration of the restricted editing mode feature.\n * The option is used by the {@link module:restricted-editing/restrictededitingmode~RestrictedEditingMode} feature.\n *\n *\t\tClassicEditor\n *\t\t\t.create( {\n * \t\t\t\trestrictedEditing: {\n * \t\t\t\t\tallowedCommands: [ 'bold', 'link', 'unlink' ],\n * \t\t\t\t\tallowedAttributes: [ 'bold', 'linkHref' ]\n * \t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.\n *\n * @interface module:restricted-editing/restrictededitingmode~RestrictedEditingModeConfig\n */\n\n/**\n * The command names allowed in non-restricted areas of the content.\n *\n * Defines which feature commands should be enabled in the restricted editing mode. The commands used for typing and deleting text\n * (`'input'`, `'delete'` and `'deleteForward'`) are allowed by the feature inside non-restricted regions and do not need to be defined.\n *\n * **Note**: The restricted editing mode always allows to use the restricted mode navigation commands as well as `'undo'` and `'redo'`\n * commands.\n *\n * The default value is:\n *\n *\t\tconst restrictedEditingConfig = {\n *\t\t\tallowedCommands: [ 'bold', 'italic', 'link', 'unlink' ]\n *\t\t};\n *\n * To make a command always enabled (also outside non-restricted areas) use\n * {@link module:restricted-editing/restrictededitingmodeediting~RestrictedEditingModeEditing#enableCommand} method.\n *\n * @member {Array.<String>} module:restricted-editing/restrictededitingmode~RestrictedEditingModeConfig#allowedCommands\n */\n\n/**\n * The text attribute names allowed when pasting content ot non-restricted areas.\n *\n * The default value is:\n *\n *\t\tconst restrictedEditingConfig = {\n *\t\t\tallowedAttributes: [ 'bold', 'italic', 'linkHref' ]\n *\t\t};\n *\n * @member {Array.<String>} module:restricted-editing/restrictededitingmode~RestrictedEditingModeConfig#allowedAttributes\n */\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/restrictededitingmode/converters\n */\n\nimport { Matcher } from 'ckeditor5/src/engine';\n\nimport { getMarkerAtPosition } from './utils';\n\nconst HIGHLIGHT_CLASS = 'restricted-editing-exception_selected';\n\n/**\n * Adds a visual highlight style to a restricted editing exception that the selection is anchored to.\n *\n * The highlight is turned on by adding the `.restricted-editing-exception_selected` class to the\n * exception in the view:\n *\n * * The class is removed before the conversion starts, as callbacks added with the `'highest'` priority\n * to {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} events.\n * * The class is added in the view post-fixer, after other changes in the model tree are converted to the view.\n *\n * This way, adding and removing the highlight does not interfere with conversion.\n *\n * @param {module:core/editor/editor~Editor} editor\n */\nexport function setupExceptionHighlighting( editor ) {\n\tconst view = editor.editing.view;\n\tconst model = editor.model;\n\tconst highlightedMarkers = new Set();\n\n\t// Adding the class.\n\tview.document.registerPostFixer( writer => {\n\t\tconst modelSelection = model.document.selection;\n\n\t\tconst marker = getMarkerAtPosition( editor, modelSelection.anchor );\n\n\t\tif ( !marker ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const viewElement of editor.editing.mapper.markerNameToElements( marker.name ) ) {\n\t\t\twriter.addClass( HIGHLIGHT_CLASS, viewElement );\n\t\t\thighlightedMarkers.add( viewElement );\n\t\t}\n\t} );\n\n\t// Removing the class.\n\teditor.conversion.for( 'editingDowncast' ).add( dispatcher => {\n\t\t// Make sure the highlight is removed on every possible event, before conversion is started.\n\t\tdispatcher.on( 'insert', removeHighlight, { priority: 'highest' } );\n\t\tdispatcher.on( 'remove', removeHighlight, { priority: 'highest' } );\n\t\tdispatcher.on( 'attribute', removeHighlight, { priority: 'highest' } );\n\t\tdispatcher.on( 'selection', removeHighlight, { priority: 'highest' } );\n\n\t\tfunction removeHighlight() {\n\t\t\tview.change( writer => {\n\t\t\t\tfor ( const item of highlightedMarkers.values() ) {\n\t\t\t\t\twriter.removeClass( HIGHLIGHT_CLASS, item );\n\t\t\t\t\thighlightedMarkers.delete( item );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n}\n\n/**\n * A post-fixer that prevents removing a collapsed marker from the document.\n *\n * @param {module:core/editor/editor~Editor} editor\n * @returns {Function}\n */\nexport function resurrectCollapsedMarkerPostFixer( editor ) {\n\t// This post-fixer shouldn't be necessary after https://github.com/ckeditor/ckeditor5/issues/5778.\n\treturn writer => {\n\t\tlet changeApplied = false;\n\n\t\tfor ( const [ name, data ] of editor.model.document.differ._changedMarkers ) {\n\t\t\tif ( name.startsWith( 'restrictedEditingException' ) && data.newRange.root.rootName == '$graveyard' ) {\n\t\t\t\twriter.updateMarker( name, {\n\t\t\t\t\trange: writer.createRange( writer.createPositionAt( editor.model.document.selection.focus ) )\n\t\t\t\t} );\n\n\t\t\t\tchangeApplied = true;\n\t\t\t}\n\t\t}\n\n\t\treturn changeApplied;\n\t};\n}\n\n/**\n * A post-fixer that extends a marker when the user types on its boundaries.\n *\n * @param {module:core/editor/editor~Editor} editor\n * @returns {Function}\n */\nexport function extendMarkerOnTypingPostFixer( editor ) {\n\t// This post-fixer shouldn't be necessary after https://github.com/ckeditor/ckeditor5/issues/5778.\n\treturn writer => {\n\t\tlet changeApplied = false;\n\n\t\tfor ( const change of editor.model.document.differ.getChanges() ) {\n\t\t\tif ( change.type == 'insert' && change.name == '$text' ) {\n\t\t\t\tchangeApplied = _tryExtendMarkerStart( editor, change.position, change.length, writer ) || changeApplied;\n\t\t\t\tchangeApplied = _tryExtendMarkedEnd( editor, change.position, change.length, writer ) || changeApplied;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n}\n\n/**\n * A view highlight-to-marker conversion helper.\n *\n * @param {Object} config Conversion configuration.\n * @param {module:engine/view/matcher~MatcherPattern} [config.view] A pattern matching all view elements which should be converted. If not\n * set, the converter will fire for every view element.\n * @param {String|module:engine/model/element~Element|Function} config.model The name of the model element, a model element\n * instance or a function that takes a view element and returns a model element. The model element will be inserted in the model.\n * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.\n */\nexport function upcastHighlightToMarker( config ) {\n\treturn dispatcher => dispatcher.on( 'element:span', ( evt, data, conversionApi ) => {\n\t\tconst { writer } = conversionApi;\n\n\t\tconst matcher = new Matcher( config.view );\n\t\tconst matcherResult = matcher.match( data.viewItem );\n\n\t\t// If there is no match, this callback should not do anything.\n\t\tif ( !matcherResult ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst match = matcherResult.match;\n\n\t\t// Force consuming element's name (taken from upcast helpers elementToElement converter).\n\t\tmatch.name = true;\n\n\t\tconst { modelRange: convertedChildrenRange } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\t\tconversionApi.consumable.consume( data.viewItem, match );\n\n\t\tconst markerName = config.model( data.viewItem );\n\t\tconst fakeMarkerStart = writer.createElement( '$marker', { 'data-name': markerName } );\n\t\tconst fakeMarkerEnd = writer.createElement( '$marker', { 'data-name': markerName } );\n\n\t\t// Insert in reverse order to use converter content positions directly (without recalculating).\n\t\twriter.insert( fakeMarkerEnd, convertedChildrenRange.end );\n\t\twriter.insert( fakeMarkerStart, convertedChildrenRange.start );\n\n\t\tdata.modelRange = writer.createRange(\n\t\t\twriter.createPositionBefore( fakeMarkerStart ),\n\t\t\twriter.createPositionAfter( fakeMarkerEnd )\n\t\t);\n\t\tdata.modelCursor = data.modelRange.end;\n\t} );\n}\n\n// Extend marker if change detected on marker's start position.\nfunction _tryExtendMarkerStart( editor, position, length, writer ) {\n\tconst markerAtStart = getMarkerAtPosition( editor, position.getShiftedBy( length ) );\n\n\tif ( markerAtStart && markerAtStart.getStart().isEqual( position.getShiftedBy( length ) ) ) {\n\t\twriter.updateMarker( markerAtStart, {\n\t\t\trange: writer.createRange( markerAtStart.getStart().getShiftedBy( -length ), markerAtStart.getEnd() )\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n// Extend marker if change detected on marker's end position.\nfunction _tryExtendMarkedEnd( editor, position, length, writer ) {\n\tconst markerAtEnd = getMarkerAtPosition( editor, position );\n\n\tif ( markerAtEnd && markerAtEnd.getEnd().isEqual( position ) ) {\n\t\twriter.updateMarker( markerAtEnd, {\n\t\t\trange: writer.createRange( markerAtEnd.getStart(), markerAtEnd.getEnd().getShiftedBy( length ) )\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/restrictededitingmode/utils\n */\n\n/**\n * Returns a single \"restricted-editing-exception\" marker at a given position. Contrary to\n * {@link module:engine/model/markercollection~MarkerCollection#getMarkersAtPosition}, it returnd a marker also when the postion is\n * equal to one of the marker's start or end positions.\n *\n * @param {module:core/editor/editor~Editor} editor\n * @param {module:engine/model/position~Position} position\n * @returns {module:engine/model/markercollection~Marker|undefined} marker\n */\nexport function getMarkerAtPosition( editor, position ) {\n\tfor ( const marker of editor.model.markers ) {\n\t\tconst markerRange = marker.getRange();\n\n\t\tif ( isPositionInRangeBoundaries( markerRange, position ) ) {\n\t\t\tif ( marker.name.startsWith( 'restrictedEditingException:' ) ) {\n\t\t\t\treturn marker;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Checks if the position is fully contained in the range. Positions equal to range start or end are considered \"in\".\n *\n * @param {module:engine/model/range~Range} range\n * @param {module:engine/model/position~Position} position\n * @returns {Boolean}\n */\nexport function isPositionInRangeBoundaries( range, position ) {\n\treturn (\n\t\trange.containsPosition( position ) ||\n\t\trange.end.isEqual( position ) ||\n\t\trange.start.isEqual( position )\n\t);\n}\n\n/**\n * Checks if the selection is fully contained in the marker. Positions on marker boundaries are considered \"in\".\n *\n *\t\t<marker>[]foo</marker> -> true\n *\t\t<marker>f[oo]</marker> -> true\n *\t\t<marker>f[oo</marker> ba]r -> false\n *\t\t<marker>foo</marker> []bar -> false\n *\n * @param {module:engine/model/selection~Selection} selection\n * @param {module:engine/model/markercollection~Marker} marker\n * @returns {Boolean}\n */\nexport function isSelectionInMarker( selection, marker ) {\n\tif ( !marker ) {\n\t\treturn false;\n\t}\n\n\tconst markerRange = marker.getRange();\n\n\tif ( selection.isCollapsed ) {\n\t\treturn isPositionInRangeBoundaries( markerRange, selection.focus );\n\t}\n\n\treturn markerRange.containsRange( selection.getFirstRange(), true );\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/restrictededitingmodeediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport RestrictedEditingNavigationCommand from './restrictededitingmodenavigationcommand';\nimport {\n\textendMarkerOnTypingPostFixer,\n\tresurrectCollapsedMarkerPostFixer,\n\tsetupExceptionHighlighting,\n\tupcastHighlightToMarker\n} from './restrictededitingmode/converters';\nimport { getMarkerAtPosition, isSelectionInMarker } from './restrictededitingmode/utils';\n\nconst COMMAND_FORCE_DISABLE_ID = 'RestrictedEditingMode';\n\n/**\n * The restricted editing mode editing feature.\n *\n * * It introduces the exception marker group that renders to `<span>` elements with the `restricted-editing-exception` CSS class.\n * * It registers the `'goToPreviousRestrictedEditingException'` and `'goToNextRestrictedEditingException'` commands.\n * * It also enables highlighting exception markers that are selected.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class RestrictedEditingModeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'RestrictedEditingModeEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'restrictedEditing', {\n\t\t\tallowedCommands: [ 'bold', 'italic', 'link', 'unlink' ],\n\t\t\tallowedAttributes: [ 'bold', 'italic', 'linkHref' ]\n\t\t} );\n\n\t\t/**\n\t\t * Command names that are enabled outside the non-restricted regions.\n\t\t *\n\t\t * @type {Set.<String>}\n\t\t * @private\n\t\t */\n\t\tthis._alwaysEnabled = new Set( [ 'undo', 'redo', 'goToPreviousRestrictedEditingException', 'goToNextRestrictedEditingException' ] );\n\n\t\t/**\n\t\t * Commands allowed in non-restricted areas.\n\t\t *\n\t\t * Commands always enabled combine typing feature commands: `'typing'`, `'delete'` and `'deleteForward'` with commands defined\n\t\t * in the feature configuration.\n\t\t *\n\t\t * @type {Set<string>}\n\t\t * @private\n\t\t */\n\t\tthis._allowedInException = new Set( [ 'input', 'delete', 'deleteForward' ] );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst allowedCommands = editor.config.get( 'restrictedEditing.allowedCommands' );\n\n\t\tallowedCommands.forEach( commandName => this._allowedInException.add( commandName ) );\n\n\t\tthis._setupConversion();\n\t\tthis._setupCommandsToggling();\n\t\tthis._setupRestrictions();\n\n\t\t// Commands & keystrokes that allow navigation in the content.\n\t\teditor.commands.add( 'goToPreviousRestrictedEditingException', new RestrictedEditingNavigationCommand( editor, 'backward' ) );\n\t\teditor.commands.add( 'goToNextRestrictedEditingException', new RestrictedEditingNavigationCommand( editor, 'forward' ) );\n\t\teditor.keystrokes.set( 'Tab', getCommandExecuter( editor, 'goToNextRestrictedEditingException' ) );\n\t\teditor.keystrokes.set( 'Shift+Tab', getCommandExecuter( editor, 'goToPreviousRestrictedEditingException' ) );\n\t\teditor.keystrokes.set( 'Ctrl+A', getSelectAllHandler( editor ) );\n\n\t\teditingView.change( writer => {\n\t\t\tfor ( const root of editingView.document.roots ) {\n\t\t\t\twriter.addClass( 'ck-restricted-editing_mode_restricted', root );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Makes the given command always enabled in the restricted editing mode (regardless\n\t * of selection location).\n\t *\n\t * To enable some commands in non-restricted areas of the content use\n\t * {@link module:restricted-editing/restrictededitingmode~RestrictedEditingModeConfig#allowedCommands} configuration option.\n\t *\n\t * @param {String} commandName Name of the command to enable.\n\t */\n\tenableCommand( commandName ) {\n\t\tconst command = this.editor.commands.get( commandName );\n\n\t\tcommand.clearForceDisabled( COMMAND_FORCE_DISABLE_ID );\n\n\t\tthis._alwaysEnabled.add( commandName );\n\t}\n\n\t/**\n\t * Sets up the restricted mode editing conversion:\n\t *\n\t * * ucpast & downcast converters,\n\t * * marker highlighting in the edting area,\n\t * * marker post-fixers.\n\t *\n\t * @private\n\t */\n\t_setupConversion() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\t// The restricted editing does not attach additional data to the zones so there's no need for smarter markers managing.\n\t\t// Also, the markers will only be created when loading the data.\n\t\tlet markerNumber = 0;\n\n\t\teditor.conversion.for( 'upcast' ).add( upcastHighlightToMarker( {\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tclasses: 'restricted-editing-exception'\n\t\t\t},\n\t\t\tmodel: () => {\n\t\t\t\tmarkerNumber++; // Starting from restrictedEditingException:1 marker.\n\n\t\t\t\treturn `restrictedEditingException:${ markerNumber }`;\n\t\t\t}\n\t\t} ) );\n\n\t\t// Currently the marker helpers are tied to other use-cases and do not render a collapsed marker as highlight.\n\t\t// That's why there are 2 downcast converters for them:\n\t\t// 1. The default marker-to-highlight will wrap selected text with `<span>`.\n\t\teditor.conversion.for( 'downcast' ).markerToHighlight( {\n\t\t\tmodel: 'restrictedEditingException',\n\t\t\t// Use callback to return new object every time new marker instance is created - otherwise it will be seen as the same marker.\n\t\t\tview: () => {\n\t\t\t\treturn {\n\t\t\t\t\tname: 'span',\n\t\t\t\t\tclasses: 'restricted-editing-exception',\n\t\t\t\t\tpriority: -10\n\t\t\t\t};\n\t\t\t}\n\t\t} );\n\n\t\t// 2. But for collapsed marker we need to render it as an element.\n\t\t// Additionally the editing pipeline should always display a collapsed marker.\n\t\teditor.conversion.for( 'editingDowncast' ).markerToElement( {\n\t\t\tmodel: 'restrictedEditingException',\n\t\t\tview: ( markerData, { writer } ) => {\n\t\t\t\treturn writer.createUIElement( 'span', {\n\t\t\t\t\tclass: 'restricted-editing-exception restricted-editing-exception_collapsed'\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'dataDowncast' ).markerToElement( {\n\t\t\tmodel: 'restrictedEditingException',\n\t\t\tview: ( markerData, { writer } ) => {\n\t\t\t\treturn writer.createEmptyElement( 'span', {\n\t\t\t\t\tclass: 'restricted-editing-exception'\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tdoc.registerPostFixer( extendMarkerOnTypingPostFixer( editor ) );\n\t\tdoc.registerPostFixer( resurrectCollapsedMarkerPostFixer( editor ) );\n\t\tmodel.markers.on( 'update:restrictedEditingException', ensureNewMarkerIsFlat( editor ) );\n\n\t\tsetupExceptionHighlighting( editor );\n\t}\n\n\t/**\n\t * Setups additional editing restrictions beyond command toggling:\n\t *\n\t * * delete content range trimming\n\t * * disabling input command outside exception marker\n\t * * restricting clipboard holder to text only\n\t * * restricting text attributes in content\n\t *\n\t * @private\n\t */\n\t_setupRestrictions() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst viewDoc = editor.editing.view.document;\n\n\t\tthis.listenTo( model, 'deleteContent', restrictDeleteContent( editor ), { priority: 'high' } );\n\n\t\tconst inputCommand = editor.commands.get( 'input' );\n\n\t\t// The restricted editing might be configured without input support - ie allow only bolding or removing text.\n\t\t// This check is bit synthetic since only tests are used this way.\n\t\tif ( inputCommand ) {\n\t\t\tthis.listenTo( inputCommand, 'execute', disallowInputExecForWrongRange( editor ), { priority: 'high' } );\n\t\t}\n\n\t\t// Block clipboard outside exception marker on paste.\n\t\tthis.listenTo( viewDoc, 'clipboardInput', function( evt ) {\n\t\t\tif ( !isRangeInsideSingleMarker( editor, selection.getFirstRange() ) ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// Block clipboard outside exception marker on cut.\n\t\tthis.listenTo( viewDoc, 'clipboardOutput', ( evt, data ) => {\n\t\t\tif ( data.method == 'cut' && !isRangeInsideSingleMarker( editor, selection.getFirstRange() ) ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\tconst allowedAttributes = editor.config.get( 'restrictedEditing.allowedAttributes' );\n\t\tmodel.schema.addAttributeCheck( onlyAllowAttributesFromList( allowedAttributes ) );\n\t\tmodel.schema.addChildCheck( allowTextOnlyInClipboardHolder );\n\t}\n\n\t/**\n\t * Sets up the command toggling which enables or disables commands based on the user selection.\n\t *\n\t * @private\n\t */\n\t_setupCommandsToggling() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis._disableCommands( editor );\n\n\t\tthis.listenTo( doc.selection, 'change', this._checkCommands.bind( this ) );\n\t\tthis.listenTo( doc, 'change:data', this._checkCommands.bind( this ) );\n\t}\n\n\t/**\n\t * Checks if commands should be enabled or disabled based on the current selection.\n\t *\n\t * @private\n\t */\n\t_checkCommands() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\n\t\tif ( selection.rangeCount > 1 ) {\n\t\t\tthis._disableCommands( editor );\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst marker = getMarkerAtPosition( editor, selection.focus );\n\n\t\tthis._disableCommands();\n\n\t\tif ( isSelectionInMarker( selection, marker ) ) {\n\t\t\tthis._enableCommands( marker );\n\t\t}\n\t}\n\n\t/**\n\t * Enables commands in non-restricted regions.\n\t *\n\t * @returns {module:engine/model/markercollection~Marker} marker\n\t * @private\n\t */\n\t_enableCommands( marker ) {\n\t\tconst editor = this.editor;\n\n\t\tconst commands = this._getCommandNamesToToggle( editor, this._allowedInException )\n\t\t\t.filter( name => this._allowedInException.has( name ) )\n\t\t\t.filter( filterDeleteCommandsOnMarkerBoundaries( editor.model.document.selection, marker.getRange() ) )\n\t\t\t.map( name => editor.commands.get( name ) );\n\n\t\tfor ( const command of commands ) {\n\t\t\tcommand.clearForceDisabled( COMMAND_FORCE_DISABLE_ID );\n\t\t}\n\t}\n\n\t/**\n\t * Disables commands outside non-restricted regions.\n\t *\n\t * @private\n\t */\n\t_disableCommands() {\n\t\tconst editor = this.editor;\n\t\tconst commands = this._getCommandNamesToToggle( editor )\n\t\t\t.map( name => editor.commands.get( name ) );\n\n\t\tfor ( const command of commands ) {\n\t\t\tcommand.forceDisabled( COMMAND_FORCE_DISABLE_ID );\n\t\t}\n\t}\n\n\t/**\n\t * Returns command names that should be toggleable.\n\t *\n\t * @param {module:core/editor/editor~Editor} editor\n\t * @returns {Array.<String>}\n\t * @private\n\t */\n\t_getCommandNamesToToggle( editor ) {\n\t\treturn Array.from( editor.commands.names() )\n\t\t\t.filter( name => !this._alwaysEnabled.has( name ) );\n\t}\n}\n\n// Helper method for executing enabled commands only.\nfunction getCommandExecuter( editor, commandName ) {\n\treturn ( data, cancel ) => {\n\t\tconst command = editor.commands.get( commandName );\n\n\t\tif ( command.isEnabled ) {\n\t\t\teditor.execute( commandName );\n\t\t\tcancel();\n\t\t}\n\t};\n}\n\n// Helper for handling Ctrl+A keydown behaviour.\nfunction getSelectAllHandler( editor ) {\n\treturn ( data, cancel ) => {\n\t\tconst model = editor.model;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst marker = getMarkerAtPosition( editor, selection.focus );\n\n\t\tif ( !marker ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If selection range is inside a restricted editing exception, select text only within the exception.\n\t\t//\n\t\t// Note: Second Ctrl+A press is also blocked and it won't select the entire text in the editor.\n\t\tconst selectionRange = selection.getFirstRange();\n\t\tconst markerRange = marker.getRange();\n\n\t\tif ( markerRange.containsRange( selectionRange, true ) || selection.isCollapsed ) {\n\t\t\tcancel();\n\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( marker.getRange() );\n\t\t\t} );\n\t\t}\n\t};\n}\n\n// Additional filtering rule for enabling \"delete\" and \"deleteForward\" commands if selection is on range boundaries:\n//\n// Does not allow to enable command when selection focus is:\n// - is on marker start - \"delete\" - to prevent removing content before marker\n// - is on marker end - \"deleteForward\" - to prevent removing content after marker\nfunction filterDeleteCommandsOnMarkerBoundaries( selection, markerRange ) {\n\treturn name => {\n\t\tif ( name == 'delete' && markerRange.start.isEqual( selection.focus ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only for collapsed selection - non-collapsed selection that extends over a marker is handled elsewhere.\n\t\tif ( name == 'deleteForward' && selection.isCollapsed && markerRange.end.isEqual( selection.focus ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n}\n\n// Ensures that model.deleteContent() does not delete outside exception markers ranges.\n//\n// The enforced restrictions are:\n// - only execute deleteContent() inside exception markers\n// - restrict passed selection to exception marker\nfunction restrictDeleteContent( editor ) {\n\treturn ( evt, args ) => {\n\t\tconst [ selection ] = args;\n\n\t\tconst marker = getMarkerAtPosition( editor, selection.focus ) || getMarkerAtPosition( editor, selection.anchor );\n\n\t\t// Stop method execution if marker was not found at selection focus.\n\t\tif ( !marker ) {\n\t\t\tevt.stop();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Collapsed selection inside exception marker does not require fixing.\n\t\tif ( selection.isCollapsed ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Shrink the selection to the range inside exception marker.\n\t\tconst allowedToDelete = marker.getRange().getIntersection( selection.getFirstRange() );\n\n\t\t// Some features uses selection passed to model.deleteContent() to set the selection afterwards. For this we need to properly modify\n\t\t// either the document selection using change block...\n\t\tif ( selection.is( 'documentSelection' ) ) {\n\t\t\teditor.model.change( writer => {\n\t\t\t\twriter.setSelection( allowedToDelete );\n\t\t\t} );\n\t\t}\n\t\t// ... or by modifying passed selection instance directly.\n\t\telse {\n\t\t\tselection.setTo( allowedToDelete );\n\t\t}\n\t};\n}\n\n// Ensures that input command is executed with a range that is inside exception marker.\n//\n// This restriction is due to fact that using native spell check changes text outside exception marker.\nfunction disallowInputExecForWrongRange( editor ) {\n\treturn ( evt, args ) => {\n\t\tconst [ options ] = args;\n\t\tconst { range } = options;\n\n\t\t// Only check \"input\" command executed with a range value.\n\t\t// Selection might be set in exception marker but passed range might point elsewhere.\n\t\tif ( !range ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !isRangeInsideSingleMarker( editor, range ) ) {\n\t\t\tevt.stop();\n\t\t}\n\t};\n}\n\nfunction isRangeInsideSingleMarker( editor, range ) {\n\tconst markerAtStart = getMarkerAtPosition( editor, range.start );\n\tconst markerAtEnd = getMarkerAtPosition( editor, range.end );\n\n\treturn markerAtStart && markerAtEnd && markerAtEnd === markerAtStart;\n}\n\n// Checks if new marker range is flat. Non-flat ranges might appear during upcast conversion in nested structures, ie tables.\n//\n// Note: This marker fixer only consider case which is possible to create using StandardEditing mode plugin.\n// Markers created by developer in the data might break in many other ways.\n//\n// See #6003.\nfunction ensureNewMarkerIsFlat( editor ) {\n\tconst model = editor.model;\n\n\treturn ( evt, marker, oldRange, newRange ) => {\n\t\tif ( !oldRange && !newRange.isFlat ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\tconst start = newRange.start;\n\t\t\t\tconst end = newRange.end;\n\n\t\t\t\tconst startIsHigherInTree = start.path.length > end.path.length;\n\n\t\t\t\tconst fixedStart = startIsHigherInTree ? newRange.start : writer.createPositionAt( end.parent, 0 );\n\t\t\t\tconst fixedEnd = startIsHigherInTree ? writer.createPositionAt( start.parent, 'end' ) : newRange.end;\n\n\t\t\t\twriter.updateMarker( marker, {\n\t\t\t\t\trange: writer.createRange( fixedStart, fixedEnd )\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\t};\n}\n\nfunction onlyAllowAttributesFromList( allowedAttributes ) {\n\treturn ( context, attributeName ) => {\n\t\tif ( context.startsWith( '$clipboardHolder' ) ) {\n\t\t\treturn allowedAttributes.includes( attributeName );\n\t\t}\n\t};\n}\n\nfunction allowTextOnlyInClipboardHolder( context, childDefinition ) {\n\tif ( context.startsWith( '$clipboardHolder' ) ) {\n\t\treturn childDefinition.name === '$text';\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/restrictededitingmodenavigationcommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\n\n/**\n * The command that allows navigation across the exceptions in the edited document.\n *\n * @extends module:core/command~Command\n */\nexport default class RestrictedEditingModeNavigationCommand extends Command {\n\t/**\n\t * Creates an instance of the command.\n\t *\n\t * @param {module:core/editor/editor~Editor} editor The editor instance.\n\t * @param {String} direction The direction that the command works. Can be either `'forward'` or `'backward'`.\n\t */\n\tconstructor( editor, direction ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * The direction of the command. Can be `'forward'` or `'backward'`.\n\t\t *\n\t\t * @readonly\n\t\t * @private\n\t\t * @member {String}\n\t\t */\n\t\tthis._direction = direction;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * @fires execute\n\t */\n\texecute() {\n\t\tconst position = getNearestExceptionRange( this.editor.model, this._direction );\n\n\t\tthis.editor.model.change( writer => {\n\t\t\twriter.setSelection( position );\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @private\n\t * @returns {Boolean} Whether the command should be enabled.\n\t */\n\t_checkEnabled() {\n\t\treturn !!getNearestExceptionRange( this.editor.model, this._direction );\n\t}\n}\n\n// Returns the range of the exception marker closest to the last position of the\n// model selection.\n//\n// @param {module:engine/model/model~Model} model\n// @param {String} direction Either \"forward\" or \"backward\".\n// @returns {module:engine/model/range~Range|null}\nfunction getNearestExceptionRange( model, direction ) {\n\tconst selection = model.document.selection;\n\tconst selectionPosition = selection.getFirstPosition();\n\tconst markerRanges = [];\n\n\t// Get all exception marker positions that start after/before the selection position.\n\tfor ( const marker of model.markers.getMarkersGroup( 'restrictedEditingException' ) ) {\n\t\tconst markerRange = marker.getRange();\n\n\t\t// Checking parent because there two positions <paragraph>foo^</paragraph><paragraph>^bar</paragraph>\n\t\t// are touching but they will represent different markers.\n\t\tconst isMarkerRangeTouching =\n\t\t\tselectionPosition.isTouching( markerRange.start ) && selectionPosition.hasSameParentAs( markerRange.start ) ||\n\t\t\tselectionPosition.isTouching( markerRange.end ) && selectionPosition.hasSameParentAs( markerRange.end );\n\n\t\t// <paragraph>foo <marker≥b[]ar</marker> baz</paragraph>\n\t\t// <paragraph>foo <marker≥b[ar</marker> ba]z</paragraph>\n\t\t// <paragraph>foo <marker≥bar</marker>[] baz</paragraph>\n\t\t// <paragraph>foo []<marker≥bar</marker> baz</paragraph>\n\t\tif ( markerRange.containsPosition( selectionPosition ) || isMarkerRangeTouching ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( direction === 'forward' && markerRange.start.isAfter( selectionPosition ) ) {\n\t\t\tmarkerRanges.push( markerRange );\n\t\t} else if ( direction === 'backward' && markerRange.end.isBefore( selectionPosition ) ) {\n\t\t\tmarkerRanges.push( markerRange );\n\t\t}\n\t}\n\n\tif ( !markerRanges.length ) {\n\t\treturn null;\n\t}\n\n\t// Get the marker closest to the selection position among many. To know that, we need to sort\n\t// them first.\n\treturn markerRanges.sort( ( rangeA, rangeB ) => {\n\t\tif ( direction === 'forward' ) {\n\t\t\treturn rangeA.start.isAfter( rangeB.start ) ? 1 : -1;\n\t\t} else {\n\t\t\treturn rangeA.start.isBefore( rangeB.start ) ? 1 : -1;\n\t\t}\n\t} ).shift();\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/restrictededitingmodeui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';\nimport { Collection } from 'ckeditor5/src/utils';\n\nimport lockIcon from '../theme/icons/contentlock.svg';\n\n/**\n * The restricted editing mode UI feature.\n *\n * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate between exceptions across\n * the document.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class RestrictedEditingModeUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'RestrictedEditingModeUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'restrictedEditing', locale => {\n\t\t\tconst dropdownView = createDropdown( locale );\n\t\t\tconst listItems = new Collection();\n\n\t\t\tlistItems.add( this._getButtonDefinition(\n\t\t\t\t'goToPreviousRestrictedEditingException',\n\t\t\t\tt( 'Previous editable region' ),\n\t\t\t\t'Shift+Tab'\n\t\t\t) );\n\t\t\tlistItems.add( this._getButtonDefinition(\n\t\t\t\t'goToNextRestrictedEditingException',\n\t\t\t\tt( 'Next editable region' ),\n\t\t\t\t'Tab'\n\t\t\t) );\n\n\t\t\taddListToDropdown( dropdownView, listItems );\n\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tlabel: t( 'Navigate editable regions' ),\n\t\t\t\ticon: lockIcon,\n\t\t\t\ttooltip: true,\n\t\t\t\tisEnabled: true,\n\t\t\t\tisOn: false\n\t\t\t} );\n\n\t\t\tthis.listenTo( dropdownView, 'execute', evt => {\n\t\t\t\teditor.execute( evt.source._commandName );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\t}\n\n\t/**\n\t * Returns a definition of the navigation button to be used in the dropdown.\n\t *\n\t * @private\n\t * @param {String} commandName The name of the command that the button represents.\n\t * @param {String} label The translated label of the button.\n\t * @param {String} keystroke The button keystroke.\n\t * @returns {module:ui/dropdown/utils~ListDropdownItemDefinition}\n\t */\n\t_getButtonDefinition( commandName, label, keystroke ) {\n\t\tconst editor = this.editor;\n\t\tconst command = editor.commands.get( commandName );\n\t\tconst definition = {\n\t\t\ttype: 'button',\n\t\t\tmodel: new Model( {\n\t\t\t\tlabel,\n\t\t\t\twithText: true,\n\t\t\t\tkeystroke,\n\t\t\t\twithKeystroke: true,\n\t\t\t\t_commandName: commandName\n\t\t\t} )\n\t\t};\n\n\t\tdefinition.model.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\treturn definition;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/standardeditingmode\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport StandardEditingModeEditing from './standardeditingmodeediting';\nimport StandardEditingModeUI from './standardeditingmodeui';\n\nimport '../theme/restrictedediting.css';\n\n/**\n * The standard editing mode plugin.\n *\n * This is a \"glue\" plugin that loads the following plugins:\n *\n * * The {@link module:restricted-editing/standardeditingmodeediting~StandardEditingModeEditing standard mode editing feature}.\n * * The {@link module:restricted-editing/standardeditingmodeui~StandardEditingModeUI standard mode UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class StandardEditingMode extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'StandardEditingMode';\n\t}\n\n\tstatic get requires() {\n\t\treturn [ StandardEditingModeEditing, StandardEditingModeUI ];\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/standardeditingmodeediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport RestrictedEditingExceptionCommand from './restrictededitingexceptioncommand';\n\n/**\n * The standard editing mode editing feature.\n *\n * * It introduces the `restrictedEditingException` text attribute that is rendered as\n * a `<span>` element with the `restricted-editing-exception` CSS class.\n * * It registers the `'restrictedEditingException'` command.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class StandardEditingModeEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'StandardEditingModeEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\n\t\teditor.model.schema.extend( '$text', { allowAttributes: [ 'restrictedEditingException' ] } );\n\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tmodel: 'restrictedEditingException',\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tclasses: 'restricted-editing-exception'\n\t\t\t}\n\t\t} );\n\n\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: 'restrictedEditingException',\n\t\t\tview: ( modelAttributeValue, { writer } ) => {\n\t\t\t\tif ( modelAttributeValue ) {\n\t\t\t\t\t// Make the restricted editing <span> outer-most in the view.\n\t\t\t\t\treturn writer.createAttributeElement( 'span', { class: 'restricted-editing-exception' }, { priority: -10 } );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\teditor.commands.add( 'restrictedEditingException', new RestrictedEditingExceptionCommand( editor ) );\n\n\t\teditor.editing.view.change( writer => {\n\t\t\tfor ( const root of editor.editing.view.document.roots ) {\n\t\t\t\twriter.addClass( 'ck-restricted-editing_mode_standard', root );\n\t\t\t}\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module restricted-editing/standardeditingmodeui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { ButtonView } from 'ckeditor5/src/ui';\n\nimport unlockIcon from '../theme/icons/contentunlock.svg';\n\n/**\n * The standard editing mode UI feature.\n *\n * It introduces the `'restrictedEditingException'` button that marks text as unrestricted for editing.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class StandardEditingModeUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'restrictedEditingException', locale => {\n\t\t\tconst command = editor.commands.get( 'restrictedEditingException' );\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\ticon: unlockIcon,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );\n\t\t\tview.bind( 'label' ).to( command, 'value', value => {\n\t\t\t\treturn value ? t( 'Disable editing' ) : t( 'Enable editing' );\n\t\t\t} );\n\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\teditor.execute( 'restrictedEditingException' );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n}\n","export default \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M15.5 6.5a3.5 3.5 0 0 1 3.495 3.308L19 10v2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5zm0-6a2 2 0 0 0-2 2v2h4v-2a2 2 0 0 0-2-2zm-9.25 8a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5z\\\"/></svg>\";","export default \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M6.25 16a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm0-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 1 1 0-1.5h5.5zm3-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h8.5zm6-5a.75.75 0 1 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5zm.25 5.5a3.5 3.5 0 0 1 3.143 1.959.75.75 0 0 1-1.36.636A2 2 0 0 0 13.5 10v2H19a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1v-2l.005-.192A3.5 3.5 0 0 1 15.5 6.5zm0 7.5a.5.5 0 0 0-.492.41L15 14.5v2a.5.5 0 0 0 .992.09L16 16.5v-2a.5.5 0 0 0-.5-.5z\\\"/></svg>\";","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/postcss-loader/src/index.js??ref--5-1!./restrictedediting.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/core.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/engine.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/ui.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/utils.js\");","module.exports = CKEditor5.dll;"],"sourceRoot":""}
|