Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-restricted-editing

Package Overview
Dependencies
Maintainers
1
Versions
686
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-restricted-editing - npm Package Compare versions

Comparing version 29.0.0 to 29.1.0

ckeditor5-metadata.json

2

build/restricted-editing.js

@@ -5,2 +5,2 @@ /*!

*/
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]}}}]);
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")&&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&&(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]}}}]);
{
"name": "@ckeditor/ckeditor5-restricted-editing",
"version": "29.0.0",
"description": "A restricted editing feature for CKEditor 5 editors.",
"version": "29.1.0",
"description": "Restricted editing feature for CKEditor 5 editors.",
"keywords": [

@@ -9,24 +9,25 @@ "ckeditor",

"ckeditor 5",
"ckeditor5-lib"
"ckeditor5-lib",
"ckeditor5-dll"
],
"main": "src/index.js",
"dependencies": {
"ckeditor5": "^29.0.0"
"ckeditor5": "^29.1.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "^29.0.0",
"@ckeditor/ckeditor5-block-quote": "^29.0.0",
"@ckeditor/ckeditor5-clipboard": "^29.0.0",
"@ckeditor/ckeditor5-core": "^29.0.0",
"@ckeditor/ckeditor5-dev-utils": "^25.0.0",
"@ckeditor/ckeditor5-editor-classic": "^29.0.0",
"@ckeditor/ckeditor5-engine": "^29.0.0",
"@ckeditor/ckeditor5-link": "^29.0.0",
"@ckeditor/ckeditor5-paragraph": "^29.0.0",
"@ckeditor/ckeditor5-table": "^29.0.0",
"@ckeditor/ckeditor5-theme-lark": "^29.0.0",
"@ckeditor/ckeditor5-typing": "^29.0.0",
"@ckeditor/ckeditor5-ui": "^29.0.0",
"@ckeditor/ckeditor5-undo": "^29.0.0",
"@ckeditor/ckeditor5-utils": "^29.0.0",
"@ckeditor/ckeditor5-basic-styles": "^29.1.0",
"@ckeditor/ckeditor5-block-quote": "^29.1.0",
"@ckeditor/ckeditor5-clipboard": "^29.1.0",
"@ckeditor/ckeditor5-core": "^29.1.0",
"@ckeditor/ckeditor5-dev-utils": "^25.3.0",
"@ckeditor/ckeditor5-editor-classic": "^29.1.0",
"@ckeditor/ckeditor5-engine": "^29.1.0",
"@ckeditor/ckeditor5-link": "^29.1.0",
"@ckeditor/ckeditor5-paragraph": "^29.1.0",
"@ckeditor/ckeditor5-table": "^29.1.0",
"@ckeditor/ckeditor5-theme-lark": "^29.1.0",
"@ckeditor/ckeditor5-typing": "^29.1.0",
"@ckeditor/ckeditor5-ui": "^29.1.0",
"@ckeditor/ckeditor5-undo": "^29.1.0",
"@ckeditor/ckeditor5-utils": "^29.1.0",
"webpack": "^4.43.0",

@@ -52,3 +53,4 @@ "webpack-cli": "^3.3.11"

"theme",
"build"
"build",
"ckeditor5-metadata.json"
],

@@ -55,0 +57,0 @@ "scripts": {

@@ -10,5 +10,9 @@ CKEditor 5 restricted editing feature

## Demo
Check out the demo in the [restricted editing feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/restricted-editing.html#demo).
## Documentation
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 guide](https://ckeditor.com/docs/ckeditor5/latest/features/restricted-editing.html) in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
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/).

@@ -15,0 +19,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc