@ckeditor/ckeditor5-remove-format 45.2.1-alpha.3 → 45.2.1-alpha.5
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/build/remove-format.js +1 -1
- package/package.json +6 -6
package/build/remove-format.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")}},e={};function o(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,o),s.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{RemoveFormat:()=>u,RemoveFormatEditing:()=>m,RemoveFormatUI:()=>n});var t=o(782),e=o(355),r=o(311);const s="removeFormat";class n extends t.Plugin{static get pluginName(){return"RemoveFormatUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.ui.componentFactory.add(s,(
|
|
5
|
+
*/(()=>{var t={237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")}},e={};function o(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,o),s.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{RemoveFormat:()=>u,RemoveFormatEditing:()=>m,RemoveFormatUI:()=>n});var t=o(782),e=o(355),r=o(311);const s="removeFormat";class n extends t.Plugin{static get pluginName(){return"RemoveFormatUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.ui.componentFactory.add(s,()=>{const t=this._createButton(r.ButtonView);return t.set({tooltip:!0}),t}),t.ui.componentFactory.add(`menuBar:${s}`,()=>this._createButton(r.MenuBarMenuListItemButtonView))}_createButton(t){const o=this.editor,i=o.locale,r=o.commands.get(s),n=new t(o.locale),a=i.t;return n.set({label:a("Remove Format"),icon:e.IconRemoveFormat}),n.bind("isEnabled").to(r,"isEnabled"),this.listenTo(n,"execute",()=>{o.execute(s),o.editing.view.focus()}),n}}var a=o(584);class c extends t.Command{refresh(){const t=this.editor.model;this.isEnabled=!!(0,a.first)(this._getFormattingItems(t.document.selection,t.schema))}execute(){const t=this.editor.model,e=t.schema;t.change(o=>{for(const i of this._getFormattingItems(t.document.selection,e))if(i.is("selection"))for(const t of this._getFormattingAttributes(i,e))o.removeSelectionAttribute(t);else{const t=o.createRangeOn(i);for(const r of this._getFormattingAttributes(i,e))o.removeAttribute(r,t)}})}*_getFormattingItems(t,e){const o=t=>!!(0,a.first)(this._getFormattingAttributes(t,e));for(const i of t.getRanges())for(const t of i.getItems())!e.isBlock(t)&&o(t)&&(yield t);for(const e of t.getSelectedBlocks())o(e)&&(yield e);o(t)&&(yield t)}*_getFormattingAttributes(t,e){for(const[o]of t.getAttributes()){const t=e.getAttributeProperties(o);t&&t.isFormatting&&(yield o)}}}class m extends t.Plugin{static get pluginName(){return"RemoveFormatEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.commands.add("removeFormat",new c(t))}}class u extends t.Plugin{static get requires(){return[m,n]}static get pluginName(){return"RemoveFormat"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).removeFormat=i})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-remove-format",
|
|
3
|
-
"version": "45.2.1-alpha.
|
|
3
|
+
"version": "45.2.1-alpha.5",
|
|
4
4
|
"description": "Remove format feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-core": "45.2.1-alpha.
|
|
17
|
-
"@ckeditor/ckeditor5-icons": "45.2.1-alpha.
|
|
18
|
-
"@ckeditor/ckeditor5-ui": "45.2.1-alpha.
|
|
19
|
-
"@ckeditor/ckeditor5-utils": "45.2.1-alpha.
|
|
20
|
-
"ckeditor5": "45.2.1-alpha.
|
|
16
|
+
"@ckeditor/ckeditor5-core": "45.2.1-alpha.5",
|
|
17
|
+
"@ckeditor/ckeditor5-icons": "45.2.1-alpha.5",
|
|
18
|
+
"@ckeditor/ckeditor5-ui": "45.2.1-alpha.5",
|
|
19
|
+
"@ckeditor/ckeditor5-utils": "45.2.1-alpha.5",
|
|
20
|
+
"ckeditor5": "45.2.1-alpha.5"
|
|
21
21
|
},
|
|
22
22
|
"author": "CKSource (http://cksource.com/)",
|
|
23
23
|
"license": "SEE LICENSE IN LICENSE.md",
|