@ckeditor/ckeditor5-restricted-editing 40.2.0 → 41.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/LICENSE.md +1 -1
- package/build/restricted-editing.js +2 -2
- package/lang/translations/ar.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +3 -2
- package/src/augmentation.d.ts +2 -2
- package/src/augmentation.js +1 -1
- package/src/index.d.ts +11 -11
- package/src/index.js +8 -8
- package/src/restrictededitingconfig.d.ts +1 -1
- package/src/restrictededitingconfig.js +1 -1
- package/src/restrictededitingexceptioncommand.d.ts +2 -2
- package/src/restrictededitingexceptioncommand.js +2 -2
- package/src/restrictededitingmode/converters.d.ts +3 -3
- package/src/restrictededitingmode/converters.js +3 -3
- package/src/restrictededitingmode/utils.d.ts +3 -3
- package/src/restrictededitingmode/utils.js +1 -1
- package/src/restrictededitingmode.d.ts +4 -4
- package/src/restrictededitingmode.js +4 -4
- package/src/restrictededitingmodeediting.d.ts +2 -2
- package/src/restrictededitingmodeediting.js +5 -5
- package/src/restrictededitingmodenavigationcommand.d.ts +2 -2
- package/src/restrictededitingmodenavigationcommand.js +2 -2
- package/src/restrictededitingmodeui.d.ts +2 -2
- package/src/restrictededitingmodeui.js +5 -5
- package/src/standardeditingmode.d.ts +4 -4
- package/src/standardeditingmode.js +4 -4
- package/src/standardeditingmodeediting.d.ts +2 -2
- package/src/standardeditingmodeediting.js +3 -3
- package/src/standardeditingmodeui.d.ts +2 -2
- package/src/standardeditingmodeui.js +3 -3
- package/theme/restrictedediting.css +1 -1
package/LICENSE.md
CHANGED
@@ -2,7 +2,7 @@ Software License Agreement
|
|
2
2
|
==========================
|
3
3
|
|
4
4
|
**CKEditor 5 restricted editing feature** – https://github.com/ckeditor/ckeditor5-restricted-editing <br>
|
5
|
-
Copyright (c) 2003–
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
6
6
|
|
7
7
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
8
8
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
!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={})),
|
2
2
|
/*!
|
3
|
-
* @license Copyright (c) 2003-
|
3
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
4
4
|
* For licensing, see LICENSE.md.
|
5
|
-
*/(()=>{var e={550:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--ck-color-restricted-editing-exception-background:rgba(255,169,77,.2);--ck-color-restricted-editing-exception-hover-background:rgba(255,169,77,.35);--ck-color-restricted-editing-exception-brackets:rgba(204,105,0,.4);--ck-color-restricted-editing-selected-exception-background:rgba(255,169,77,.5);--ck-color-restricted-editing-selected-exception-brackets:rgba(204,105,0,.6)}.ck-editor__editable .restricted-editing-exception{background-color:var(--ck-color-restricted-editing-exception-background);border:1px solid;border-image:linear-gradient(to right,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) 100%) 1;transition:background .2s ease-in-out}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_selected{background-color:var(--ck-color-restricted-editing-selected-exception-background);border-image:linear-gradient(to right,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) 100%) 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)}",""]);const o=r},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var c=0;c<e.length;c++){var a=[].concat(e[c]);n&&r[a[0]]||(i&&(a[2]?a[2]="".concat(i," and ").concat(a[2]):a[2]=i),t.push(a))}},t}},62:(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 a(e,t){for(var i={},n=[],r=0;r<e.length;r++){var o=e[r],a=t.base?o[0]+t.base:o[0],d=i[a]||0,l="".concat(a," ").concat(d);i[a]=d+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:f(u,t),references:1}),n.push(l)}return n}function d(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,h=0;function f(e,t){var i,n,r;if(t.singleton){var o=h++;i=p||(p=d(t)),n=u.bind(null,i,o,!1),r=u.bind(null,i,o,!0)}else i=d(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=a(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=a(e,t),d=0;d<i.length;d++){var l=c(i[d]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}i=o}}}},704:(e,t,i)=>{e.exports=i(79)("./src/core.js")},492:(e,t,i)=>{e.exports=i(79)("./src/engine.js")},273:(e,t,i)=>{e.exports=i(79)("./src/ui.js")},209:(e,t,i)=>{e.exports=i(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={id:n,exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{RestrictedEditingMode:()=>_,RestrictedEditingModeEditing:()=>u,RestrictedEditingModeUI:()=>v,StandardEditingMode:()=>T,StandardEditingModeEditing:()=>C,StandardEditingModeUI:()=>R});var e=i(704);class t extends e.Command{constructor(e,t){super(e),this.affectsData=!1,this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=r(this.editor.model,this._direction);e&&this.editor.model.change((t=>{t.setSelection(e)}))}_checkEnabled(){return!!r(this.editor.model,this._direction)}}function r(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)}if(n.length)return n.sort(((e,i)=>"forward"===t?e.start.isAfter(i.start)?1:-1:e.start.isBefore(i.start)?1:-1)).shift()}var o=i(492);function s(e,t){for(const i of e.model.markers){if(c(i.getRange(),t)&&i.name.startsWith("restrictedEditingException:"))return i}}function c(e,t){return e.containsPosition(t)||e.end.isEqual(t)||e.start.isEqual(t)}const a="restricted-editing-exception_selected";function d(e,t,i,n){const r=s(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=s(e,t);return!(!r||!r.getEnd().isEqual(t))&&(n.updateMarker(r,{range:n.createRange(r.getStart(),r.getEnd().getShiftedBy(i))}),!0)}const g="RestrictedEditingMode";class u extends e.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","insertText","delete","deleteForward"])}init(){const e=this.editor,i=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 t(e,"backward")),e.commands.add("goToNextRestrictedEditingException",new t(e,"forward")),e.keystrokes.set("Tab",m(e,"goToNextRestrictedEditingException")),e.keystrokes.set("Shift+Tab",m(e,"goToPreviousRestrictedEditingException")),e.keystrokes.set("Ctrl+A",function(e){return(t,i)=>{const n=e.model,r=e.model.document.selection,o=s(e,r.focus);if(!o)return;const c=r.getFirstRange();(o.getRange().containsRange(c,!0)||r.isCollapsed)&&(i(),n.change((e=>{e.setSelection(o.getRange())})))}}(e)),i.change((e=>{for(const t of i.document.roots)e.addClass("ck-restricted-editing_mode_restricted",t)}))}enableCommand(e){this.editor.commands.get(e).clearForceDisabled(g),this._alwaysEnabled.add(e)}_setupConversion(){const e=this.editor,t=e.model.document;let i=0;var n;e.conversion.for("upcast").add((n={view:{name:"span",classes:"restricted-editing-exception"},model:()=>(i++,`restrictedEditingException:${i}`)},e=>e.on("element:span",((e,t,i)=>{const{writer:r}=i,s=new o.Matcher(n.view).match(t.viewItem);if(!s)return;const c=s.match;c.name=!0;const{modelRange:a}=i.convertChildren(t.viewItem,t.modelCursor);i.consumable.consume(t.viewItem,c);const d=n.model(),l=r.createElement("$marker",{"data-name":d}),g=r.createElement("$marker",{"data-name":d});r.insert(g,a.end),r.insert(l,a.start),t.modelRange=r.createRange(r.createPositionBefore(l),r.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"})}),t.registerPostFixer(function(e){return t=>{let i=!1;for(const n of e.model.document.differ.getChanges())"insert"==n.type&&"$text"==n.name&&(i=d(e,n.position,n.length,t)||i,i=l(e,n.position,n.length,t)||i);return i}}(e)),t.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.registerPostFixer(function(e){return t=>{let i=!1;const n=e.model.document.differ.getChangedMarkers();for(const{data:e,name:r}of n){if(!r.startsWith("restrictedEditingException"))continue;const n=e.newRange;if(!e.oldRange&&!n.isFlat){const e=n.start,o=n.end,s=e.path.length>o.path.length,c=s?n.start:t.createPositionAt(o.parent,0),a=s?t.createPositionAt(e.parent,"end"):n.end;t.updateMarker(r,{range:t.createRange(c,a)}),i=!0}}return i}}(e)),function(e){const t=e.editing.view,i=e.model,n=new Set;t.document.registerPostFixer((t=>{const r=i.document.selection,o=s(e,r.anchor);if(!o)return!1;for(const i of e.editing.mapper.markerNameToElements(o.name))t.addClass(a,i),n.add(i);return!1})),e.conversion.for("editingDowncast").add((e=>{function i(){t.change((e=>{for(const t of n.values())e.removeClass(a,t),n.delete(t)}))}e.on("insert",i,{priority:"highest"}),e.on("remove",i,{priority:"highest"}),e.on("attribute",i,{priority:"highest"}),e.on("cleanSelection",i)}))}(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=s(e,n.focus)||s(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("insertText");o&&this.listenTo(o,"execute",function(e){return(t,i)=>{const[n]=i,{range:r}=n;r&&(h(e,r)||t.stop())}}(e),{priority:"high"}),this.listenTo(r,"contentInsertion",(t=>{h(e,i.getFirstRange())||t.stop()})),this.listenTo(n,"clipboardOutput",((t,n)=>{"cut"!=n.method||h(e,i.getFirstRange())||t.stop()}),{priority:"high"});const c=e.config.get("restrictedEditing.allowedAttributes");t.schema.addAttributeCheck(function(e){return(t,i)=>{if(t.startsWith("$clipboardHolder"))return e.includes(i)}}(c)),t.schema.addChildCheck(((e,t)=>{if(e.startsWith("$clipboardHolder"))return"$text"===t.name}))}_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=s(e,t.focus);this._disableCommands(),function(e,t){if(!t)return!1;const i=t.getRange();return e.isCollapsed?c(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)&&(p(i,t.model.document.selection,e.getRange())||n.clearForceDisabled(g))}_disableCommands(){const e=this.editor;for(const[t,i]of e.commands)i.affectsData&&!this._alwaysEnabled.has(t)&&i.forceDisabled(g)}}function m(e,t){return(i,n)=>{e.commands.get(t).isEnabled&&(e.execute(t),n())}}function p(e,t,i){return!("delete"!=e||!i.start.isEqual(t.focus))||!("deleteForward"!=e||!t.isCollapsed||!i.end.isEqual(t.focus))}function h(e,t){const i=s(e,t.start),n=s(e,t.end);return i&&n&&n===i}var f=i(273),b=i(209);class v extends e.Plugin{static get pluginName(){return"RestrictedEditingModeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("restrictedEditing",(i=>{const n=(0,f.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")),(0,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=>{const{_commandName:i}=t.source;e.execute(i),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}}var E=i(62),x=i.n(E),w=i(550),k={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(w.Z,k);w.Z.locals;class _ extends e.Plugin{static get pluginName(){return"RestrictedEditingMode"}static get requires(){return[u,v]}}class y extends e.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,r=n.getLastMatchingPosition(t,{direction:"backward"}),o=n.getLastMatchingPosition(t);e.removeSelectionAttribute("restrictedEditingException"),n.isEqual(r)||n.isEqual(o)||e.removeAttribute("restrictedEditingException",e.createRange(r,o))}else for(const t of r)n?e.setAttribute("restrictedEditingException",n,t):e.removeAttribute("restrictedEditingException",t)}))}}class C extends e.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 y(e)),e.editing.view.change((t=>{for(const i of e.editing.view.document.roots)t.addClass("ck-restricted-editing_mode_standard",i)}))}}class R extends e.Plugin{static get pluginName(){return"StandardEditingModeUI"}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 T extends e.Plugin{static get pluginName(){return"StandardEditingMode"}static get requires(){return[C,R]}}})(),(window.CKEditor5=window.CKEditor5||{}).restrictedEditing=n})();
|
5
|
+
*/(()=>{var e={673:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});var n=i(609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--ck-color-restricted-editing-exception-background:rgba(255,169,77,.2);--ck-color-restricted-editing-exception-hover-background:rgba(255,169,77,.35);--ck-color-restricted-editing-exception-brackets:rgba(204,105,0,.4);--ck-color-restricted-editing-selected-exception-background:rgba(255,169,77,.5);--ck-color-restricted-editing-selected-exception-brackets:rgba(204,105,0,.6)}.ck-editor__editable .restricted-editing-exception{background-color:var(--ck-color-restricted-editing-exception-background);border:1px solid;border-image:linear-gradient(to right,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) 100%) 1;transition:background .2s ease-in-out}.ck-editor__editable .restricted-editing-exception.restricted-editing-exception_selected{background-color:var(--ck-color-restricted-editing-selected-exception-background);border-image:linear-gradient(to right,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) 100%) 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)}",""]);const o=r},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var c=0;c<e.length;c++){var a=[].concat(e[c]);n&&r[a[0]]||(i&&(a[2]?a[2]="".concat(i," and ").concat(a[2]):a[2]=i),t.push(a))}},t}},62:(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 a(e,t){for(var i={},n=[],r=0;r<e.length;r++){var o=e[r],a=t.base?o[0]+t.base:o[0],d=i[a]||0,l="".concat(a," ").concat(d);i[a]=d+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:f(u,t),references:1}),n.push(l)}return n}function d(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,h=0;function f(e,t){var i,n,r;if(t.singleton){var o=h++;i=p||(p=d(t)),n=u.bind(null,i,o,!1),r=u.bind(null,i,o,!0)}else i=d(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=a(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=a(e,t),d=0;d<i.length;d++){var l=c(i[d]);0===s[l].references&&(s[l].updater(),s.splice(l,1))}i=o}}}},704:(e,t,i)=>{e.exports=i(79)("./src/core.js")},492:(e,t,i)=>{e.exports=i(79)("./src/engine.js")},273:(e,t,i)=>{e.exports=i(79)("./src/ui.js")},209:(e,t,i)=>{e.exports=i(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={id:n,exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{RestrictedEditingMode:()=>_,RestrictedEditingModeEditing:()=>u,RestrictedEditingModeUI:()=>v,StandardEditingMode:()=>T,StandardEditingModeEditing:()=>C,StandardEditingModeUI:()=>R});var e=i(704);class t extends e.Command{constructor(e,t){super(e),this.affectsData=!1,this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=r(this.editor.model,this._direction);e&&this.editor.model.change((t=>{t.setSelection(e)}))}_checkEnabled(){return!!r(this.editor.model,this._direction)}}function r(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)}if(n.length)return n.sort(((e,i)=>"forward"===t?e.start.isAfter(i.start)?1:-1:e.start.isBefore(i.start)?1:-1)).shift()}var o=i(492);function s(e,t){for(const i of e.model.markers){if(c(i.getRange(),t)&&i.name.startsWith("restrictedEditingException:"))return i}}function c(e,t){return e.containsPosition(t)||e.end.isEqual(t)||e.start.isEqual(t)}const a="restricted-editing-exception_selected";function d(e,t,i,n){const r=s(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=s(e,t);return!(!r||!r.getEnd().isEqual(t))&&(n.updateMarker(r,{range:n.createRange(r.getStart(),r.getEnd().getShiftedBy(i))}),!0)}const g="RestrictedEditingMode";class u extends e.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","insertText","delete","deleteForward"])}init(){const e=this.editor,i=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 t(e,"backward")),e.commands.add("goToNextRestrictedEditingException",new t(e,"forward")),e.keystrokes.set("Tab",m(e,"goToNextRestrictedEditingException")),e.keystrokes.set("Shift+Tab",m(e,"goToPreviousRestrictedEditingException")),e.keystrokes.set("Ctrl+A",function(e){return(t,i)=>{const n=e.model,r=e.model.document.selection,o=s(e,r.focus);if(!o)return;const c=r.getFirstRange();(o.getRange().containsRange(c,!0)||r.isCollapsed)&&(i(),n.change((e=>{e.setSelection(o.getRange())})))}}(e)),i.change((e=>{for(const t of i.document.roots)e.addClass("ck-restricted-editing_mode_restricted",t)}))}enableCommand(e){this.editor.commands.get(e).clearForceDisabled(g),this._alwaysEnabled.add(e)}_setupConversion(){const e=this.editor,t=e.model.document;let i=0;var n;e.conversion.for("upcast").add((n={view:{name:"span",classes:"restricted-editing-exception"},model:()=>(i++,`restrictedEditingException:${i}`)},e=>e.on("element:span",((e,t,i)=>{const{writer:r}=i,s=new o.Matcher(n.view).match(t.viewItem);if(!s)return;const c=s.match;c.name=!0;const{modelRange:a}=i.convertChildren(t.viewItem,t.modelCursor);i.consumable.consume(t.viewItem,c);const d=n.model(),l=r.createElement("$marker",{"data-name":d}),g=r.createElement("$marker",{"data-name":d});r.insert(g,a.end),r.insert(l,a.start),t.modelRange=r.createRange(r.createPositionBefore(l),r.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"})}),t.registerPostFixer(function(e){return t=>{let i=!1;for(const n of e.model.document.differ.getChanges())"insert"==n.type&&"$text"==n.name&&(i=d(e,n.position,n.length,t)||i,i=l(e,n.position,n.length,t)||i);return i}}(e)),t.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.registerPostFixer(function(e){return t=>{let i=!1;const n=e.model.document.differ.getChangedMarkers();for(const{data:e,name:r}of n){if(!r.startsWith("restrictedEditingException"))continue;const n=e.newRange;if(!e.oldRange&&!n.isFlat){const e=n.start,o=n.end,s=e.path.length>o.path.length,c=s?n.start:t.createPositionAt(o.parent,0),a=s?t.createPositionAt(e.parent,"end"):n.end;t.updateMarker(r,{range:t.createRange(c,a)}),i=!0}}return i}}(e)),function(e){const t=e.editing.view,i=e.model,n=new Set;t.document.registerPostFixer((t=>{const r=i.document.selection,o=s(e,r.anchor);if(!o)return!1;for(const i of e.editing.mapper.markerNameToElements(o.name))t.addClass(a,i),n.add(i);return!1})),e.conversion.for("editingDowncast").add((e=>{function i(){t.change((e=>{for(const t of n.values())e.removeClass(a,t),n.delete(t)}))}e.on("insert",i,{priority:"highest"}),e.on("remove",i,{priority:"highest"}),e.on("attribute",i,{priority:"highest"}),e.on("cleanSelection",i)}))}(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=s(e,n.focus)||s(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("insertText");o&&this.listenTo(o,"execute",function(e){return(t,i)=>{const[n]=i,{range:r}=n;r&&(h(e,r)||t.stop())}}(e),{priority:"high"}),this.listenTo(r,"contentInsertion",(t=>{h(e,i.getFirstRange())||t.stop()})),this.listenTo(n,"clipboardOutput",((t,n)=>{"cut"!=n.method||h(e,i.getFirstRange())||t.stop()}),{priority:"high"});const c=e.config.get("restrictedEditing.allowedAttributes");t.schema.addAttributeCheck(function(e){return(t,i)=>{if(t.startsWith("$clipboardHolder"))return e.includes(i)}}(c)),t.schema.addChildCheck(((e,t)=>{if(e.startsWith("$clipboardHolder"))return"$text"===t.name}))}_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=s(e,t.focus);this._disableCommands(),function(e,t){if(!t)return!1;const i=t.getRange();return e.isCollapsed?c(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)&&(p(i,t.model.document.selection,e.getRange())||n.clearForceDisabled(g))}_disableCommands(){const e=this.editor;for(const[t,i]of e.commands)i.affectsData&&!this._alwaysEnabled.has(t)&&i.forceDisabled(g)}}function m(e,t){return(i,n)=>{e.commands.get(t).isEnabled&&(e.execute(t),n())}}function p(e,t,i){return!("delete"!=e||!i.start.isEqual(t.focus))||!("deleteForward"!=e||!t.isCollapsed||!i.end.isEqual(t.focus))}function h(e,t){const i=s(e,t.start),n=s(e,t.end);return i&&n&&n===i}var f=i(273),b=i(209);class v extends e.Plugin{static get pluginName(){return"RestrictedEditingModeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("restrictedEditing",(i=>{const n=(0,f.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")),(0,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=>{const{_commandName:i}=t.source;e.execute(i),e.editing.view.focus()})),n}))}_getButtonDefinition(e,t,i){const n=this.editor.commands.get(e),r={type:"button",model:new f.ViewModel({label:t,withText:!0,keystroke:i,withKeystroke:!0,_commandName:e})};return r.model.bind("isEnabled").to(n,"isEnabled"),r}}var E=i(62),x=i.n(E),w=i(673),k={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};x()(w.Z,k);w.Z.locals;class _ extends e.Plugin{static get pluginName(){return"RestrictedEditingMode"}static get requires(){return[u,v]}}class y extends e.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,r=n.getLastMatchingPosition(t,{direction:"backward"}),o=n.getLastMatchingPosition(t);e.removeSelectionAttribute("restrictedEditingException"),n.isEqual(r)||n.isEqual(o)||e.removeAttribute("restrictedEditingException",e.createRange(r,o))}else for(const t of r)n?e.setAttribute("restrictedEditingException",n,t):e.removeAttribute("restrictedEditingException",t)}))}}class C extends e.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 y(e)),e.editing.view.change((t=>{for(const i of e.editing.view.document.roots)t.addClass("ck-restricted-editing_mode_standard",i)}))}}class R extends e.Plugin{static get pluginName(){return"StandardEditingModeUI"}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 T extends e.Plugin{static get pluginName(){return"StandardEditingMode"}static get requires(){return[C,R]}}})(),(window.CKEditor5=window.CKEditor5||{}).restrictedEditing=n})();
|
package/lang/translations/ar.po
CHANGED
package/lang/translations/az.po
CHANGED
package/lang/translations/bg.po
CHANGED
package/lang/translations/bn.po
CHANGED
package/lang/translations/ca.po
CHANGED
package/lang/translations/cs.po
CHANGED
package/lang/translations/da.po
CHANGED
package/lang/translations/de.po
CHANGED
package/lang/translations/el.po
CHANGED
package/lang/translations/en.po
CHANGED
package/lang/translations/es.po
CHANGED
package/lang/translations/et.po
CHANGED
package/lang/translations/fa.po
CHANGED
package/lang/translations/fi.po
CHANGED
package/lang/translations/fr.po
CHANGED
package/lang/translations/gl.po
CHANGED
package/lang/translations/he.po
CHANGED
package/lang/translations/hi.po
CHANGED
package/lang/translations/hr.po
CHANGED
package/lang/translations/hu.po
CHANGED
package/lang/translations/id.po
CHANGED
package/lang/translations/it.po
CHANGED
package/lang/translations/ja.po
CHANGED
package/lang/translations/ko.po
CHANGED
package/lang/translations/ku.po
CHANGED
package/lang/translations/lt.po
CHANGED
package/lang/translations/lv.po
CHANGED
package/lang/translations/ms.po
CHANGED
package/lang/translations/nl.po
CHANGED
package/lang/translations/no.po
CHANGED
package/lang/translations/pl.po
CHANGED
package/lang/translations/pt.po
CHANGED
package/lang/translations/ro.po
CHANGED
package/lang/translations/ru.po
CHANGED
package/lang/translations/sk.po
CHANGED
package/lang/translations/sq.po
CHANGED
package/lang/translations/sr.po
CHANGED
package/lang/translations/sv.po
CHANGED
package/lang/translations/th.po
CHANGED
package/lang/translations/tk.po
CHANGED
package/lang/translations/tr.po
CHANGED
package/lang/translations/uk.po
CHANGED
package/lang/translations/ur.po
CHANGED
package/lang/translations/uz.po
CHANGED
package/lang/translations/vi.po
CHANGED
package/lang/translations/zh.po
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-restricted-editing",
|
3
|
-
"version": "
|
3
|
+
"version": "41.0.0",
|
4
4
|
"description": "Restricted editing feature for CKEditor 5 editors.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -9,9 +9,10 @@
|
|
9
9
|
"ckeditor5-lib",
|
10
10
|
"ckeditor5-dll"
|
11
11
|
],
|
12
|
+
"type": "module",
|
12
13
|
"main": "src/index.js",
|
13
14
|
"dependencies": {
|
14
|
-
"ckeditor5": "
|
15
|
+
"ckeditor5": "41.0.0"
|
15
16
|
},
|
16
17
|
"author": "CKSource (http://cksource.com/)",
|
17
18
|
"license": "GPL-2.0-or-later",
|
package/src/augmentation.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
|
-
import type { RestrictedEditingMode, RestrictedEditingModeEditing, RestrictedEditingModeUI, StandardEditingMode, StandardEditingModeEditing, StandardEditingModeUI, RestrictedEditingConfig, RestrictedEditingExceptionCommand, RestrictedEditingModeNavigationCommand } from './index';
|
5
|
+
import type { RestrictedEditingMode, RestrictedEditingModeEditing, RestrictedEditingModeUI, StandardEditingMode, StandardEditingModeEditing, StandardEditingModeUI, RestrictedEditingConfig, RestrictedEditingExceptionCommand, RestrictedEditingModeNavigationCommand } from './index.js';
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
7
7
|
interface PluginsMap {
|
8
8
|
[RestrictedEditingMode.pluginName]: RestrictedEditingMode;
|
package/src/augmentation.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
export {};
|
package/src/index.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing
|
7
7
|
*/
|
8
|
-
export { default as RestrictedEditingMode } from './restrictededitingmode';
|
9
|
-
export { default as RestrictedEditingModeEditing } from './restrictededitingmodeediting';
|
10
|
-
export { default as RestrictedEditingModeUI } from './restrictededitingmodeui';
|
11
|
-
export { default as StandardEditingMode } from './standardeditingmode';
|
12
|
-
export { default as StandardEditingModeEditing } from './standardeditingmodeediting';
|
13
|
-
export { default as StandardEditingModeUI } from './standardeditingmodeui';
|
14
|
-
export type { RestrictedEditingConfig } from './restrictededitingconfig';
|
15
|
-
export type { default as RestrictedEditingExceptionCommand } from './restrictededitingexceptioncommand';
|
16
|
-
export type { default as RestrictedEditingModeNavigationCommand } from './restrictededitingmodenavigationcommand';
|
17
|
-
import './augmentation';
|
8
|
+
export { default as RestrictedEditingMode } from './restrictededitingmode.js';
|
9
|
+
export { default as RestrictedEditingModeEditing } from './restrictededitingmodeediting.js';
|
10
|
+
export { default as RestrictedEditingModeUI } from './restrictededitingmodeui.js';
|
11
|
+
export { default as StandardEditingMode } from './standardeditingmode.js';
|
12
|
+
export { default as StandardEditingModeEditing } from './standardeditingmodeediting.js';
|
13
|
+
export { default as StandardEditingModeUI } from './standardeditingmodeui.js';
|
14
|
+
export type { RestrictedEditingConfig } from './restrictededitingconfig.js';
|
15
|
+
export type { default as RestrictedEditingExceptionCommand } from './restrictededitingexceptioncommand.js';
|
16
|
+
export type { default as RestrictedEditingModeNavigationCommand } from './restrictededitingmodenavigationcommand.js';
|
17
|
+
import './augmentation.js';
|
package/src/index.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing
|
7
7
|
*/
|
8
|
-
export { default as RestrictedEditingMode } from './restrictededitingmode';
|
9
|
-
export { default as RestrictedEditingModeEditing } from './restrictededitingmodeediting';
|
10
|
-
export { default as RestrictedEditingModeUI } from './restrictededitingmodeui';
|
11
|
-
export { default as StandardEditingMode } from './standardeditingmode';
|
12
|
-
export { default as StandardEditingModeEditing } from './standardeditingmodeediting';
|
13
|
-
export { default as StandardEditingModeUI } from './standardeditingmodeui';
|
14
|
-
import './augmentation';
|
8
|
+
export { default as RestrictedEditingMode } from './restrictededitingmode.js';
|
9
|
+
export { default as RestrictedEditingModeEditing } from './restrictededitingmodeediting.js';
|
10
|
+
export { default as RestrictedEditingModeUI } from './restrictededitingmodeui.js';
|
11
|
+
export { default as StandardEditingMode } from './standardeditingmode.js';
|
12
|
+
export { default as StandardEditingModeEditing } from './standardeditingmodeediting.js';
|
13
|
+
export { default as StandardEditingModeUI } from './standardeditingmodeui.js';
|
14
|
+
import './augmentation.js';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
export {};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingexceptioncommand
|
7
7
|
*/
|
8
|
-
import { Command } from 'ckeditor5/src/core';
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
9
9
|
/**
|
10
10
|
* The command that toggles exceptions from the restricted editing on text.
|
11
11
|
*/
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingexceptioncommand
|
7
7
|
*/
|
8
|
-
import { Command } from 'ckeditor5/src/core';
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
9
9
|
/**
|
10
10
|
* The command that toggles exceptions from the restricted editing on text.
|
11
11
|
*/
|
@@ -1,12 +1,12 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingmode/converters
|
7
7
|
*/
|
8
|
-
import type { Editor } from 'ckeditor5/src/core';
|
9
|
-
import { type MatcherPattern, type ModelPostFixer, type UpcastDispatcher } from 'ckeditor5/src/engine';
|
8
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
9
|
+
import { type MatcherPattern, type ModelPostFixer, type UpcastDispatcher } from 'ckeditor5/src/engine.js';
|
10
10
|
/**
|
11
11
|
* Adds a visual highlight style to a restricted editing exception that the selection is anchored to.
|
12
12
|
*
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
|
-
import { Matcher } from 'ckeditor5/src/engine';
|
6
|
-
import { getMarkerAtPosition } from './utils';
|
5
|
+
import { Matcher } from 'ckeditor5/src/engine.js';
|
6
|
+
import { getMarkerAtPosition } from './utils.js';
|
7
7
|
const HIGHLIGHT_CLASS = 'restricted-editing-exception_selected';
|
8
8
|
/**
|
9
9
|
* Adds a visual highlight style to a restricted editing exception that the selection is anchored to.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
|
-
import type { Editor } from 'ckeditor5/src/core';
|
6
|
-
import type { DocumentSelection, Marker, Position, Range } from 'ckeditor5/src/engine';
|
5
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
6
|
+
import type { DocumentSelection, Marker, Position, Range } from 'ckeditor5/src/engine.js';
|
7
7
|
/**
|
8
8
|
* @module restricted-editing/restrictededitingmode/utils
|
9
9
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingmode
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import RestrictedEditingModeEditing from './restrictededitingmodeediting';
|
10
|
-
import RestrictedEditingModeUI from './restrictededitingmodeui';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import RestrictedEditingModeEditing from './restrictededitingmodeediting.js';
|
10
|
+
import RestrictedEditingModeUI from './restrictededitingmodeui.js';
|
11
11
|
import '../theme/restrictedediting.css';
|
12
12
|
/**
|
13
13
|
* The restricted editing mode plugin.
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingmode
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import RestrictedEditingModeEditing from './restrictededitingmodeediting';
|
10
|
-
import RestrictedEditingModeUI from './restrictededitingmodeui';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import RestrictedEditingModeEditing from './restrictededitingmodeediting.js';
|
10
|
+
import RestrictedEditingModeUI from './restrictededitingmodeui.js';
|
11
11
|
import '../theme/restrictedediting.css';
|
12
12
|
/**
|
13
13
|
* The restricted editing mode plugin.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingmodeediting
|
7
7
|
*/
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
9
9
|
/**
|
10
10
|
* The restricted editing mode editing feature.
|
11
11
|
*
|
@@ -1,14 +1,14 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingmodeediting
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import RestrictedEditingModeNavigationCommand from './restrictededitingmodenavigationcommand';
|
10
|
-
import { extendMarkerOnTypingPostFixer, resurrectCollapsedMarkerPostFixer, setupExceptionHighlighting, upcastHighlightToMarker } from './restrictededitingmode/converters';
|
11
|
-
import { getMarkerAtPosition, isSelectionInMarker } from './restrictededitingmode/utils';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import RestrictedEditingModeNavigationCommand from './restrictededitingmodenavigationcommand.js';
|
10
|
+
import { extendMarkerOnTypingPostFixer, resurrectCollapsedMarkerPostFixer, setupExceptionHighlighting, upcastHighlightToMarker } from './restrictededitingmode/converters.js';
|
11
|
+
import { getMarkerAtPosition, isSelectionInMarker } from './restrictededitingmode/utils.js';
|
12
12
|
const COMMAND_FORCE_DISABLE_ID = 'RestrictedEditingMode';
|
13
13
|
/**
|
14
14
|
* The restricted editing mode editing feature.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
|
-
import { Command, type Editor } from 'ckeditor5/src/core';
|
5
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
6
6
|
/**
|
7
7
|
* The command that allows navigation across the exceptions in the edited document.
|
8
8
|
*/
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
|
-
import { Command } from 'ckeditor5/src/core';
|
5
|
+
import { Command } from 'ckeditor5/src/core.js';
|
6
6
|
/**
|
7
7
|
* The command that allows navigation across the exceptions in the edited document.
|
8
8
|
*/
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingmodeui
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
9
|
/**
|
10
10
|
* The restricted editing mode UI feature.
|
11
11
|
*
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/restrictededitingmodeui
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import {
|
10
|
-
import { Collection } from 'ckeditor5/src/utils';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import { ViewModel, createDropdown, addListToDropdown } from 'ckeditor5/src/ui.js';
|
10
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
11
11
|
import lockIcon from '../theme/icons/contentlock.svg';
|
12
12
|
/**
|
13
13
|
* The restricted editing mode UI feature.
|
@@ -61,7 +61,7 @@ export default class RestrictedEditingModeUI extends Plugin {
|
|
61
61
|
const command = editor.commands.get(commandName);
|
62
62
|
const definition = {
|
63
63
|
type: 'button',
|
64
|
-
model: new
|
64
|
+
model: new ViewModel({
|
65
65
|
label,
|
66
66
|
withText: true,
|
67
67
|
keystroke,
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/standardeditingmode
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import StandardEditingModeEditing from './standardeditingmodeediting';
|
10
|
-
import StandardEditingModeUI from './standardeditingmodeui';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import StandardEditingModeEditing from './standardeditingmodeediting.js';
|
10
|
+
import StandardEditingModeUI from './standardeditingmodeui.js';
|
11
11
|
import '../theme/restrictedediting.css';
|
12
12
|
/**
|
13
13
|
* The standard editing mode plugin.
|
@@ -1,13 +1,13 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/standardeditingmode
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import StandardEditingModeEditing from './standardeditingmodeediting';
|
10
|
-
import StandardEditingModeUI from './standardeditingmodeui';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import StandardEditingModeEditing from './standardeditingmodeediting.js';
|
10
|
+
import StandardEditingModeUI from './standardeditingmodeui.js';
|
11
11
|
import '../theme/restrictedediting.css';
|
12
12
|
/**
|
13
13
|
* The standard editing mode plugin.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/standardeditingmodeediting
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
9
|
/**
|
10
10
|
* The standard editing mode editing feature.
|
11
11
|
*
|
@@ -1,12 +1,12 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/standardeditingmodeediting
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import RestrictedEditingExceptionCommand from './restrictededitingexceptioncommand';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import RestrictedEditingExceptionCommand from './restrictededitingexceptioncommand.js';
|
10
10
|
/**
|
11
11
|
* The standard editing mode editing feature.
|
12
12
|
*
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/standardeditingmodeui
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
9
|
/**
|
10
10
|
* The standard editing mode UI feature.
|
11
11
|
*
|
@@ -1,12 +1,12 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
4
|
*/
|
5
5
|
/**
|
6
6
|
* @module restricted-editing/standardeditingmodeui
|
7
7
|
*/
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
9
|
-
import { ButtonView } from 'ckeditor5/src/ui';
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import { ButtonView } from 'ckeditor5/src/ui.js';
|
10
10
|
import unlockIcon from '../theme/icons/contentunlock.svg';
|
11
11
|
/**
|
12
12
|
* The standard editing mode UI feature.
|