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

@ckeditor/ckeditor5-editor-inline

Package Overview
Dependencies
Maintainers
1
Versions
763
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-editor-inline - npm Package Compare versions

Comparing version 27.0.0 to 27.1.0

2

build/editor-inline.js

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

*/
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.editorInline=function(t){var e={};function o(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(i,r,function(e){return t[e]}.bind(null,r));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=7)}([function(t,e,o){t.exports=o(3)("./src/utils.js")},function(t,e,o){t.exports=o(3)("./src/core.js")},function(t,e,o){t.exports=o(3)("./src/ui.js")},function(t,e){t.exports=CKEditor5.dll},function(t,e,o){t.exports=o(3)("./src/engine.js")},function(t,e,o){"use strict";(function(t){var o="object"==typeof t&&t&&t.Object===Object&&t;e.a=o}).call(this,o(6))},function(t,e){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(t){"object"==typeof window&&(o=window)}t.exports=o},function(t,e,o){"use strict";o.r(e);var i=o(1),r=o(0);var n=function(t){return null!=t&&"object"==typeof t},s=o(5),l="object"==typeof self&&self&&self.Object===Object&&self,a=(s.a||l||Function("return this")()).Symbol,c=Object.prototype,u=c.hasOwnProperty,d=c.toString,h=a?a.toStringTag:void 0;var f=function(t){var e=u.call(t,h),o=t[h];try{t[h]=void 0;var i=!0}catch(t){}var r=d.call(t);return i&&(e?t[h]=o:delete t[h]),r},p=Object.prototype.toString;var b=function(t){return p.call(t)},g=a?a.toStringTag:void 0;var w=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":g&&g in Object(t)?f(t):b(t)};var v=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object),m=Function.prototype,O=Object.prototype,y=m.toString,j=O.hasOwnProperty,T=y.call(Object);var E=function(t){if(!n(t)||"[object Object]"!=w(t))return!1;var e=v(t);if(null===e)return!0;var o=j.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&y.call(o)==T};var P=function(t){return n(t)&&1===t.nodeType&&!E(t)},_=o(2),x=o(4);class F extends i.EditorUI{constructor(t,e){super(t),this.view=e,this._toolbarConfig=Object(_.normalizeToolbarConfig)(t.config.get("toolbar"))}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,o=t.editing.view,i=e.editable,r=o.document.getRoot();i.name=r.rootName,e.render();const n=i.element;this.setEditableElement(i.name,n),this.focusTracker.add(n),i.bind("isFocused").to(this.focusTracker),o.attachDomRoot(n),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view,o=e.editable.element,i=t.editing.view,r=e.toolbar;e.panel.bind("isVisible").to(this.focusTracker,"isFocused"),this._toolbarConfig.viewportTopOffset&&(e.viewportTopOffset=this._toolbarConfig.viewportTopOffset),e.listenTo(t.ui,"update",()=>{e.panel.isVisible&&e.panel.pin({target:o,positions:e.panelPositions})}),r.fillFromConfig(this._toolbarConfig,this.componentFactory),Object(_.enableToolbarKeyboardFocus)({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:r})}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),i=t.sourceElement,r=t.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");r&&Object(x.enablePlaceholder)({view:e,element:o,text:r,isDirectHost:!1,keepOnFocus:!0})}}const C=Object(r.toUnit)("px");class S extends _.EditorUIView{constructor(t,e,o,i={}){super(t),this.toolbar=new _.ToolbarView(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull,isFloating:!0}),this.set("viewportTopOffset",0),this.panel=new _.BalloonPanelView(t),this.panel.withArrow=!1,this.panelPositions=this._getPanelPositions(),this.panel.extendTemplate({attributes:{class:"ck-toolbar-container"}}),this.editable=new _.InlineEditableUIView(t,e,o),this._resizeObserver=null}render(){super.render(),this.body.add(this.panel),this.registerChild(this.editable),this.panel.content.add(this.toolbar);if(this.toolbar.options.shouldGroupWhenFull){const t=this.editable.element;this._resizeObserver=new r.ResizeObserver(t,()=>{this.toolbar.maxWidth=C(new r.Rect(t).width)})}}destroy(){super.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getPanelPositionTop(t,e){let o;return o=t.top>e.height+this.viewportTopOffset?t.top-e.height:t.bottom>e.height+this.viewportTopOffset+50?this.viewportTopOffset:t.bottom,o}_getPanelPositions(){const t=[(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left,name:"toolbar_west"}),(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left+t.width-e.width,name:"toolbar_east"})];return"ltr"===this.locale.uiLanguageDirection?t:t.reverse()}}class k extends i.Editor{constructor(t,e){super(e),this.model.document.createRoot(),P(t)&&(this.sourceElement=t,Object(i.secureSourceElement)(this));const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=new S(this.locale,this.editing.view,this.sourceElement,{shouldToolbarGroupWhenFull:o});this.ui=new F(this,r),Object(i.attachToForm)(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&Object(r.setDataInElement)(this.sourceElement,t)})}static create(t,e={}){return new Promise(o=>{const i=P(t);if(i&&"TEXTAREA"===t.tagName)throw new r.CKEditorError("editor-wrong-element",null);const n=new this(t,e);o(n.initPlugins().then(()=>{n.ui.init()}).then(()=>{if(!i&&e.initialData)throw new r.CKEditorError("editor-create-initial-data",null);const o=e.initialData||function(t){return P(t)?Object(r.getDataFromElement)(t):t}(t);return n.data.init(o)}).then(()=>n.fire("ready")).then(()=>n))})}}Object(r.mix)(k,i.DataApiMixin),Object(r.mix)(k,i.ElementApiMixin);e.default={InlineEditor:k}}]).default;
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.editorInline=function(t){var e={};function o(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(i,r,function(e){return t[e]}.bind(null,r));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=7)}([function(t,e,o){t.exports=o(3)("./src/utils.js")},function(t,e,o){t.exports=o(3)("./src/core.js")},function(t,e,o){t.exports=o(3)("./src/ui.js")},function(t,e){t.exports=CKEditor5.dll},function(t,e,o){t.exports=o(3)("./src/engine.js")},function(t,e,o){"use strict";(function(t){var o="object"==typeof t&&t&&t.Object===Object&&t;e.a=o}).call(this,o(6))},function(t,e){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(t){"object"==typeof window&&(o=window)}t.exports=o},function(t,e,o){"use strict";o.r(e);var i=o(1),r=o(0);var n=function(t){return null!=t&&"object"==typeof t},s=o(5),l="object"==typeof self&&self&&self.Object===Object&&self,a=(s.a||l||Function("return this")()).Symbol,c=Object.prototype,u=c.hasOwnProperty,d=c.toString,h=a?a.toStringTag:void 0;var f=function(t){var e=u.call(t,h),o=t[h];try{t[h]=void 0;var i=!0}catch(t){}var r=d.call(t);return i&&(e?t[h]=o:delete t[h]),r},p=Object.prototype.toString;var b=function(t){return p.call(t)},g=a?a.toStringTag:void 0;var w=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":g&&g in Object(t)?f(t):b(t)};var v=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object),m=Function.prototype,O=Object.prototype,y=m.toString,j=O.hasOwnProperty,T=y.call(Object);var E=function(t){if(!n(t)||"[object Object]"!=w(t))return!1;var e=v(t);if(null===e)return!0;var o=j.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&y.call(o)==T};var P=function(t){return n(t)&&1===t.nodeType&&!E(t)},_=o(2),x=o(4);class F extends i.EditorUI{constructor(t,e){super(t),this.view=e,this._toolbarConfig=Object(_.normalizeToolbarConfig)(t.config.get("toolbar"))}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,o=t.editing.view,i=e.editable,r=o.document.getRoot();i.name=r.rootName,e.render();const n=i.element;this.setEditableElement(i.name,n),this.focusTracker.add(n),i.bind("isFocused").to(this.focusTracker),o.attachDomRoot(n),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view,o=e.editable.element,i=t.editing.view,r=e.toolbar;e.panel.bind("isVisible").to(this.focusTracker,"isFocused"),this._toolbarConfig.viewportTopOffset&&(e.viewportTopOffset=this._toolbarConfig.viewportTopOffset),e.listenTo(t.ui,"update",()=>{e.panel.isVisible&&e.panel.pin({target:o,positions:e.panelPositions})}),r.fillFromConfig(this._toolbarConfig,this.componentFactory),Object(_.enableToolbarKeyboardFocus)({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:r})}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),i=t.sourceElement,r=t.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");r&&Object(x.enablePlaceholder)({view:e,element:o,text:r,isDirectHost:!1,keepOnFocus:!0})}}const C=Object(r.toUnit)("px");class S extends _.EditorUIView{constructor(t,e,o,i={}){super(t),this.toolbar=new _.ToolbarView(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull,isFloating:!0}),this.set("viewportTopOffset",0),this.panel=new _.BalloonPanelView(t),this.panel.withArrow=!1,this.panelPositions=this._getPanelPositions(),this.panel.extendTemplate({attributes:{class:"ck-toolbar-container"}}),this.editable=new _.InlineEditableUIView(t,e,o),this._resizeObserver=null}render(){super.render(),this.body.add(this.panel),this.registerChild(this.editable),this.panel.content.add(this.toolbar);if(this.toolbar.options.shouldGroupWhenFull){const t=this.editable.element;this._resizeObserver=new r.ResizeObserver(t,()=>{this.toolbar.maxWidth=C(new r.Rect(t).width)})}}destroy(){super.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getPanelPositionTop(t,e){let o;return o=t.top>e.height+this.viewportTopOffset?t.top-e.height:t.bottom>e.height+this.viewportTopOffset+50?this.viewportTopOffset:t.bottom,o}_getPanelPositions(){const t=[(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left,name:"toolbar_west"}),(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left+t.width-e.width,name:"toolbar_east"})];return"ltr"===this.locale.uiLanguageDirection?t:t.reverse()}}class D extends i.Editor{constructor(t,e){super(e),this.model.document.createRoot(),P(t)&&(this.sourceElement=t,Object(i.secureSourceElement)(this));const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=new S(this.locale,this.editing.view,this.sourceElement,{shouldToolbarGroupWhenFull:o});this.ui=new F(this,r),Object(i.attachToForm)(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&Object(r.setDataInElement)(this.sourceElement,t)})}static create(t,e={}){return new Promise(o=>{const i=P(t);if(i&&"TEXTAREA"===t.tagName)throw new r.CKEditorError("editor-wrong-element",null);const n=new this(t,e);o(n.initPlugins().then(()=>{n.ui.init()}).then(()=>{if(!i&&e.initialData)throw new r.CKEditorError("editor-create-initial-data",null);const o=void 0!==e.initialData?e.initialData:function(t){return P(t)?Object(r.getDataFromElement)(t):t}(t);return n.data.init(o)}).then(()=>n.fire("ready")).then(()=>n))})}}Object(r.mix)(D,i.DataApiMixin),Object(r.mix)(D,i.ElementApiMixin);e.default={InlineEditor:D}}]).default;
{
"name": "@ckeditor/ckeditor5-editor-inline",
"version": "27.0.0",
"version": "27.1.0",
"description": "Inline editor implementation for CKEditor 5.",

@@ -13,18 +13,18 @@ "keywords": [

"dependencies": {
"ckeditor5": "^27.0.0",
"ckeditor5": "^27.1.0",
"lodash-es": "^4.17.15"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "^27.0.0",
"@ckeditor/ckeditor5-core": "^27.0.0",
"@ckeditor/ckeditor5-basic-styles": "^27.1.0",
"@ckeditor/ckeditor5-core": "^27.1.0",
"@ckeditor/ckeditor5-dev-utils": "^24.0.0",
"@ckeditor/ckeditor5-engine": "^27.0.0",
"@ckeditor/ckeditor5-enter": "^27.0.0",
"@ckeditor/ckeditor5-heading": "^27.0.0",
"@ckeditor/ckeditor5-paragraph": "^27.0.0",
"@ckeditor/ckeditor5-theme-lark": "^27.0.0",
"@ckeditor/ckeditor5-typing": "^27.0.0",
"@ckeditor/ckeditor5-ui": "^27.0.0",
"@ckeditor/ckeditor5-undo": "^27.0.0",
"@ckeditor/ckeditor5-utils": "^27.0.0",
"@ckeditor/ckeditor5-engine": "^27.1.0",
"@ckeditor/ckeditor5-enter": "^27.1.0",
"@ckeditor/ckeditor5-heading": "^27.1.0",
"@ckeditor/ckeditor5-paragraph": "^27.1.0",
"@ckeditor/ckeditor5-theme-lark": "^27.1.0",
"@ckeditor/ckeditor5-typing": "^27.1.0",
"@ckeditor/ckeditor5-ui": "^27.1.0",
"@ckeditor/ckeditor5-undo": "^27.1.0",
"@ckeditor/ckeditor5-utils": "^27.1.0",
"webpack": "^4.43.0",

@@ -31,0 +31,0 @@ "webpack-cli": "^3.3.11"

@@ -212,3 +212,3 @@ /**

const initialData = config.initialData || getInitialData( sourceElementOrData );
const initialData = config.initialData !== undefined ? config.initialData : getInitialData( sourceElementOrData );

@@ -215,0 +215,0 @@ return editor.data.init( initialData );

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