@ckeditor/ckeditor5-remove-format 46.0.0-alpha.3 → 46.0.0-alpha.4

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.
@@ -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(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,o),s.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},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 r={};(()=>{"use strict";o.r(r),o.d(r,{RemoveFormat:()=>u,RemoveFormatCommand:()=>c,RemoveFormatEditing:()=>m,RemoveFormatUI:()=>n});var t=o(782),e=o(355),i=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(i.ButtonView);return t.set({tooltip:!0}),t}),t.ui.componentFactory.add(`menuBar:${s}`,()=>this._createButton(i.MenuBarMenuListItemButtonView))}_createButton(t){const o=this.editor,r=o.locale,i=o.commands.get(s),n=new t(o.locale),a=r.t;return n.set({label:a("Remove Format"),icon:e.IconRemoveFormat}),n.bind("isEnabled").to(i,"isEnabled"),this.listenTo(n,"execute",()=>{o.execute(s),o.editing.view.focus()}),n}}var a=o(584);class c extends t.Command{_customAttributesHandlers=[];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 r of this._getFormattingItems(t.document.selection,e))if(r.is("selection"))for(const t of this._getFormattingAttributes(r,e))o.removeSelectionAttribute(t);else{const t=o.createRangeOn(r);for(const i of this._getFormattingAttributes(r,e))this._removeFormatting(i,r,t,o)}})}registerCustomAttribute(t,e){this._customAttributesHandlers.push({isFormatting:t,removeFormatting:e})}_removeFormatting(t,e,o,r){let i=!1;for(const{isFormatting:s,removeFormatting:n}of this._customAttributesHandlers)s(t,e)&&(n(t,o,r),i=!0);i||r.removeAttribute(t,o)}*_getFormattingItems(t,e){const o=t=>!!(0,a.first)(this._getFormattingAttributes(t,e));for(const r of t.getRanges())for(const t of r.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()){for(const{isFormatting:e}of this._customAttributesHandlers)e(o,t)&&(yield o);const r=e.getAttributeProperties(o);r&&r.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=r})();
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,RemoveFormatCommand:()=>c,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{_customAttributesHandlers=[];refresh(){const t=this.editor.model;this.isEnabled=!!(0,a.first)(this._getFormattingItems(t.document.selection))}execute(){const t=this.editor.model;t.change(e=>{for(const o of this._getFormattingItems(t.document.selection))if(o.is("selection"))for(const t of this._getFormattingAttributes(o))e.removeSelectionAttribute(t);else{const t=e.createRangeOn(o);for(const i of this._getFormattingAttributes(o))this._removeFormatting(i,o,t,e)}})}registerCustomAttribute(t,e){this._customAttributesHandlers.push({isFormatting:t,removeFormatting:e})}_removeFormatting(t,e,o,i){let r=!1;for(const{isFormatting:s,removeFormatting:n}of this._customAttributesHandlers)s(t,e)&&(n(t,o,i),r=!0);r||i.removeAttribute(t,o)}*_getFormattingItems(t){const e=this.editor.model,o=e.schema,i=t=>!!(0,a.first)(this._getFormattingAttributes(t));for(const r of t.getRanges())for(const t of r.getItems())o.isBlock(t)&&r.end.isTouching(e.createPositionAt(t,0))||i(t)&&(yield t);for(const e of t.getSelectedBlocks())i(e)&&(yield e);i(t)&&(yield t)}*_getFormattingAttributes(t){const e=this.editor.model.schema;for(const[o]of t.getAttributes()){for(const{isFormatting:e}of this._customAttributesHandlers)e(o,t)&&(yield o);const i=e.getAttributeProperties(o);i&&i.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/dist/index.js CHANGED
@@ -74,24 +74,23 @@ const REMOVE_FORMAT = 'removeFormat';
74
74
  * @inheritDoc
75
75
  */ refresh() {
76
76
  const model = this.editor.model;
77
- this.isEnabled = !!first(this._getFormattingItems(model.document.selection, model.schema));
77
+ this.isEnabled = !!first(this._getFormattingItems(model.document.selection));
78
78
  }
79
79
  /**
80
80
  * @inheritDoc
81
81
  */ execute() {
82
82
  const model = this.editor.model;
83
- const schema = model.schema;
84
83
  model.change((writer)=>{
85
- for (const item of this._getFormattingItems(model.document.selection, schema)){
84
+ for (const item of this._getFormattingItems(model.document.selection)){
86
85
  if (item.is('selection')) {
87
- for (const attributeName of this._getFormattingAttributes(item, schema)){
86
+ for (const attributeName of this._getFormattingAttributes(item)){
88
87
  writer.removeSelectionAttribute(attributeName);
89
88
  }
90
89
  } else {
91
90
  // Workaround for items with multiple removable attributes. See
92
91
  // https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609
93
92
  const itemRange = writer.createRangeOn(item);
94
- for (const attributeName of this._getFormattingAttributes(item, schema)){
93
+ for (const attributeName of this._getFormattingAttributes(item)){
95
94
  this._removeFormatting(attributeName, item, itemRange, writer);
96
95
  }
97
96
  }
@@ -125,21 +124,25 @@ const REMOVE_FORMAT = 'removeFormat';
125
124
  /**
126
125
  * Returns an iterable of items in a selection (including the selection itself) that have formatting model
127
126
  * attributes to be removed by the feature.
128
- *
129
- * @param schema The schema describing the item.
130
- */ *_getFormattingItems(selection, schema) {
127
+ */ *_getFormattingItems(selection) {
128
+ const model = this.editor.model;
129
+ const schema = model.schema;
131
130
  const itemHasRemovableFormatting = (item)=>{
132
- return !!first(this._getFormattingAttributes(item, schema));
131
+ return !!first(this._getFormattingAttributes(item));
133
132
  };
134
- // Check formatting on selected items that are not blocks.
133
+ // Check formatting on selected items.
135
134
  for (const curRange of selection.getRanges()){
136
135
  for (const item of curRange.getItems()){
137
- if (!schema.isBlock(item) && itemHasRemovableFormatting(item)) {
136
+ // Ignore last block if range ends at the beginning of it.
137
+ if (schema.isBlock(item) && curRange.end.isTouching(model.createPositionAt(item, 0))) {
138
+ continue;
139
+ }
140
+ if (itemHasRemovableFormatting(item)) {
138
141
  yield item;
139
142
  }
140
143
  }
141
144
  }
142
- // Check formatting from selected blocks.
145
+ // Check formatting from selected blocks (to include partly selected blocks).
143
146
  for (const block of selection.getSelectedBlocks()){
144
147
  if (itemHasRemovableFormatting(block)) {
145
148
  yield block;
@@ -155,9 +158,9 @@ const REMOVE_FORMAT = 'removeFormat';
155
158
  *
156
159
  * **Note:** Formatting items have the `isFormatting` property set to `true`.
157
160
  *
158
- * @param schema The schema describing the item.
159
161
  * @returns The names of formatting attributes found in a given item.
160
- */ *_getFormattingAttributes(item, schema) {
162
+ */ *_getFormattingAttributes(item) {
163
+ const schema = this.editor.model.schema;
161
164
  for (const [attributeName] of item.getAttributes()){
162
165
  for (const { isFormatting } of this._customAttributesHandlers){
163
166
  if (isFormatting(attributeName, item)) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js","../src/removeformatui.ts","../src/removeformatcommand.ts","../src/removeformatediting.ts","../src/removeformat.ts"],"names":["REMOVE_FORMAT","RemoveFormatUI","Plugin","pluginName","isOfficialPlugin","init","editor","ui","componentFactory","add","view","_createButton","ButtonView","set","tooltip","MenuBarMenuListItemButtonView","ButtonClass","locale","command","commands","get","t","label","icon","IconRemoveFormat","bind","to","listenTo","execute","editing","focus","RemoveFormatCommand","Command","_customAttributesHandlers","refresh","model","isEnabled","first","_getFormattingItems","document","selection","schema","change","writer","item","is","attributeName","_getFormattingAttributes","removeSelectionAttribute","itemRange","createRangeOn","_removeFormatting","registerCustomAttribute","isFormatting","removeFormatting","push","customHandled","removeAttribute","itemHasRemovableFormatting","curRange","getRanges","getItems","isBlock","block","getSelectedBlocks","getAttributes","attributeProperties","getAttributeProperties","RemoveFormatEditing","RemoveFormat","requires"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACxE,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC1E,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAChG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;;ACY/D,KAAA,CAAMA,aAAAA,CAAAA,CAAAA,CAAgB,CAAA,YAAA,CAAA;AAEtB,CAAA,CAAA;AD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C,CAAC,mBAAmB,CAAC,CAAC,cAAc,CAAC,CAAC;AACjF,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin, Command } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { IconRemoveFormat } from '@ckeditor/ckeditor5-icons/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\nconst REMOVE_FORMAT = 'removeFormat';\n/**\n * The remove format UI plugin. It registers the `'removeFormat'` button which can be\n * used in the toolbar.\n */ class RemoveFormatUI extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'RemoveFormatUI';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.ui.componentFactory.add(REMOVE_FORMAT, ()=>{\n const view = this._createButton(ButtonView);\n view.set({\n tooltip: true\n });\n return view;\n });\n editor.ui.componentFactory.add(`menuBar:${REMOVE_FORMAT}`, ()=>this._createButton(MenuBarMenuListItemButtonView));\n }\n /**\n\t * Creates a button for remove format command to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n const editor = this.editor;\n const locale = editor.locale;\n const command = editor.commands.get(REMOVE_FORMAT);\n const view = new ButtonClass(editor.locale);\n const t = locale.t;\n view.set({\n label: t('Remove Format'),\n icon: IconRemoveFormat\n });\n view.bind('isEnabled').to(command, 'isEnabled');\n // Execute the command.\n this.listenTo(view, 'execute', ()=>{\n editor.execute(REMOVE_FORMAT);\n editor.editing.view.focus();\n });\n return view;\n }\n}\n\n/**\n * The remove format command.\n *\n * It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}\n * to clear the formatting in the selection.\n *\n * ```ts\n * editor.execute( 'removeFormat' );\n * ```\n */ class RemoveFormatCommand extends Command {\n /**\n\t * List of all registered custom attribute handlers.\n\t */ _customAttributesHandlers = [];\n /**\n\t * @inheritDoc\n\t */ refresh() {\n const model = this.editor.model;\n this.isEnabled = !!first(this._getFormattingItems(model.document.selection, model.schema));\n }\n /**\n\t * @inheritDoc\n\t */ execute() {\n const model = this.editor.model;\n const schema = model.schema;\n model.change((writer)=>{\n for (const item of this._getFormattingItems(model.document.selection, schema)){\n if (item.is('selection')) {\n for (const attributeName of this._getFormattingAttributes(item, schema)){\n writer.removeSelectionAttribute(attributeName);\n }\n } else {\n // Workaround for items with multiple removable attributes. See\n // https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609\n const itemRange = writer.createRangeOn(item);\n for (const attributeName of this._getFormattingAttributes(item, schema)){\n this._removeFormatting(attributeName, item, itemRange, writer);\n }\n }\n }\n });\n }\n /**\n\t * Registers a custom attribute handler that will be used to determine if an attribute is formatting and how to remove it.\n\t *\n\t * @internal\n\t */ registerCustomAttribute(isFormatting, removeFormatting) {\n this._customAttributesHandlers.push({\n isFormatting,\n removeFormatting\n });\n }\n /**\n\t * Helper method that removes a formatting attribute from an item either using custom callbacks or writer remove attribute.\n\t */ _removeFormatting(attributeName, item, itemRange, writer) {\n let customHandled = false;\n for (const { isFormatting, removeFormatting } of this._customAttributesHandlers){\n if (isFormatting(attributeName, item)) {\n removeFormatting(attributeName, itemRange, writer);\n customHandled = true;\n }\n }\n if (!customHandled) {\n writer.removeAttribute(attributeName, itemRange);\n }\n }\n /**\n\t * Returns an iterable of items in a selection (including the selection itself) that have formatting model\n\t * attributes to be removed by the feature.\n\t *\n\t * @param schema The schema describing the item.\n\t */ *_getFormattingItems(selection, schema) {\n const itemHasRemovableFormatting = (item)=>{\n return !!first(this._getFormattingAttributes(item, schema));\n };\n // Check formatting on selected items that are not blocks.\n for (const curRange of selection.getRanges()){\n for (const item of curRange.getItems()){\n if (!schema.isBlock(item) && itemHasRemovableFormatting(item)) {\n yield item;\n }\n }\n }\n // Check formatting from selected blocks.\n for (const block of selection.getSelectedBlocks()){\n if (itemHasRemovableFormatting(block)) {\n yield block;\n }\n }\n // Finally the selection might be formatted as well, so make sure to check it.\n if (itemHasRemovableFormatting(selection)) {\n yield selection;\n }\n }\n /**\n\t * Returns an iterable of formatting attributes of a given model item.\n\t *\n\t * **Note:** Formatting items have the `isFormatting` property set to `true`.\n\t *\n\t * @param schema The schema describing the item.\n\t * @returns The names of formatting attributes found in a given item.\n\t */ *_getFormattingAttributes(item, schema) {\n for (const [attributeName] of item.getAttributes()){\n for (const { isFormatting } of this._customAttributesHandlers){\n if (isFormatting(attributeName, item)) {\n yield attributeName;\n }\n }\n const attributeProperties = schema.getAttributeProperties(attributeName);\n if (attributeProperties && attributeProperties.isFormatting) {\n yield attributeName;\n }\n }\n }\n}\n\n/**\n * The remove format editing plugin.\n *\n * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n */ class RemoveFormatEditing extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'RemoveFormatEditing';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.commands.add('removeFormat', new RemoveFormatCommand(editor));\n }\n}\n\n/**\n * The remove format plugin.\n *\n * This is a \"glue\" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}\n * and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.\n *\n * For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.\n */ class RemoveFormat extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n RemoveFormatEditing,\n RemoveFormatUI\n ];\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'RemoveFormat';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n}\n\nexport { RemoveFormat, RemoveFormatCommand, RemoveFormatEditing, RemoveFormatUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformatui\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { IconRemoveFormat } from 'ckeditor5/src/icons.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';\n\nimport { type RemoveFormatCommand } from './removeformatcommand.js';\n\nconst REMOVE_FORMAT = 'removeFormat';\n\n/**\n * The remove format UI plugin. It registers the `'removeFormat'` button which can be\n * used in the toolbar.\n */\nexport class RemoveFormatUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormatUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( REMOVE_FORMAT, () => {\n\t\t\tconst view = this._createButton( ButtonView );\n\n\t\t\tview.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( `menuBar:${ REMOVE_FORMAT }`, () => this._createButton( MenuBarMenuListItemButtonView ) );\n\t}\n\n\t/**\n\t * Creates a button for remove format command to use either in toolbar or in menu bar.\n\t */\n\tprivate _createButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>( ButtonClass: T ): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command: RemoveFormatCommand = editor.commands.get( REMOVE_FORMAT )!;\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\t\tconst t = locale.t;\n\n\t\tview.set( {\n\t\t\tlabel: t( 'Remove Format' ),\n\t\t\ticon: IconRemoveFormat\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t// Execute the command.\n\t\tthis.listenTo( view, 'execute', () => {\n\t\t\teditor.execute( REMOVE_FORMAT );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn view;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformatcommand\n */\n\nimport type { ModelDocumentSelection, ModelItem, ModelSchema, ModelRange, ModelWriter } from 'ckeditor5/src/engine.js';\nimport { Command } from 'ckeditor5/src/core.js';\nimport { first } from 'ckeditor5/src/utils.js';\n\n/**\n * The remove format command.\n *\n * It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}\n * to clear the formatting in the selection.\n *\n * ```ts\n * editor.execute( 'removeFormat' );\n * ```\n */\nexport class RemoveFormatCommand extends Command {\n\tdeclare public value: boolean;\n\n\t/**\n\t * List of all registered custom attribute handlers.\n\t */\n\tprivate _customAttributesHandlers: Array<{\n\t\tisFormatting: IsFormattingCallback;\n\t\tremoveFormatting: RemoveFormattingCallback;\n\t}> = [];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\n\t\tthis.isEnabled = !!first( this._getFormattingItems( model.document.selection, model.schema ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const item of this._getFormattingItems( model.document.selection, schema ) ) {\n\t\t\t\tif ( item.is( 'selection' ) ) {\n\t\t\t\t\tfor ( const attributeName of this._getFormattingAttributes( item, schema ) ) {\n\t\t\t\t\t\twriter.removeSelectionAttribute( attributeName );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Workaround for items with multiple removable attributes. See\n\t\t\t\t\t// https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609\n\t\t\t\t\tconst itemRange = writer.createRangeOn( item );\n\n\t\t\t\t\tfor ( const attributeName of this._getFormattingAttributes( item, schema ) ) {\n\t\t\t\t\t\tthis._removeFormatting( attributeName, item, itemRange, writer );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a custom attribute handler that will be used to determine if an attribute is formatting and how to remove it.\n\t *\n\t * @internal\n\t */\n\tpublic registerCustomAttribute( isFormatting: IsFormattingCallback, removeFormatting: RemoveFormattingCallback ): void {\n\t\tthis._customAttributesHandlers.push( {\n\t\t\tisFormatting,\n\t\t\tremoveFormatting\n\t\t} );\n\t}\n\n\t/**\n\t * Helper method that removes a formatting attribute from an item either using custom callbacks or writer remove attribute.\n\t */\n\tprivate _removeFormatting( attributeName: string, item: ModelItem, itemRange: ModelRange, writer: ModelWriter ) {\n\t\tlet customHandled = false;\n\n\t\tfor ( const { isFormatting, removeFormatting } of this._customAttributesHandlers ) {\n\t\t\tif ( isFormatting( attributeName, item ) ) {\n\t\t\t\tremoveFormatting( attributeName, itemRange, writer );\n\t\t\t\tcustomHandled = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( !customHandled ) {\n\t\t\twriter.removeAttribute( attributeName, itemRange );\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterable of items in a selection (including the selection itself) that have formatting model\n\t * attributes to be removed by the feature.\n\t *\n\t * @param schema The schema describing the item.\n\t */\n\tprivate* _getFormattingItems( selection: ModelDocumentSelection, schema: ModelSchema ) {\n\t\tconst itemHasRemovableFormatting = ( item: ModelItem | ModelDocumentSelection ) => {\n\t\t\treturn !!first( this._getFormattingAttributes( item, schema ) );\n\t\t};\n\n\t\t// Check formatting on selected items that are not blocks.\n\t\tfor ( const curRange of selection.getRanges() ) {\n\t\t\tfor ( const item of curRange.getItems() ) {\n\t\t\t\tif ( !schema.isBlock( item ) && itemHasRemovableFormatting( item ) ) {\n\t\t\t\t\tyield item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check formatting from selected blocks.\n\t\tfor ( const block of selection.getSelectedBlocks() ) {\n\t\t\tif ( itemHasRemovableFormatting( block ) ) {\n\t\t\t\tyield block;\n\t\t\t}\n\t\t}\n\n\t\t// Finally the selection might be formatted as well, so make sure to check it.\n\t\tif ( itemHasRemovableFormatting( selection ) ) {\n\t\t\tyield selection;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterable of formatting attributes of a given model item.\n\t *\n\t * **Note:** Formatting items have the `isFormatting` property set to `true`.\n\t *\n\t * @param schema The schema describing the item.\n\t * @returns The names of formatting attributes found in a given item.\n\t */\n\tprivate* _getFormattingAttributes( item: ModelItem | ModelDocumentSelection, schema: ModelSchema ) {\n\t\tfor ( const [ attributeName ] of item.getAttributes() ) {\n\t\t\tfor ( const { isFormatting } of this._customAttributesHandlers ) {\n\t\t\t\tif ( isFormatting( attributeName, item ) ) {\n\t\t\t\t\tyield attributeName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst attributeProperties = schema.getAttributeProperties( attributeName );\n\n\t\t\tif ( attributeProperties && attributeProperties.isFormatting ) {\n\t\t\t\tyield attributeName;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Callback that checks if an attribute is a formatting attribute.\n *\n * @internal\n */\nexport type IsFormattingCallback = ( attributeName: string, item: ModelItem | ModelDocumentSelection ) => boolean;\n\n/**\n * Callback that removes formatting from an item.\n *\n * @internal\n */\nexport type RemoveFormattingCallback = ( attributeName: string, range: ModelRange, writer: ModelWriter ) => void;\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformatediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\n\nimport { RemoveFormatCommand } from './removeformatcommand.js';\n\n/**\n * The remove format editing plugin.\n *\n * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n */\nexport class RemoveFormatEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormatEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.commands.add( 'removeFormat', new RemoveFormatCommand( editor ) );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformat\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\n\nimport { RemoveFormatUI } from './removeformatui.js';\nimport { RemoveFormatEditing } from './removeformatediting.js';\n\n/**\n * The remove format plugin.\n *\n * This is a \"glue\" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}\n * and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.\n *\n * For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.\n */\nexport class RemoveFormat extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ RemoveFormatEditing, RemoveFormatUI ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormat' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["index.js","../src/removeformatui.ts","../src/removeformatcommand.ts","../src/removeformatediting.ts","../src/removeformat.ts"],"names":["REMOVE_FORMAT","RemoveFormatUI","Plugin","pluginName","isOfficialPlugin","init","editor","ui","componentFactory","add","view","_createButton","ButtonView","set","tooltip","MenuBarMenuListItemButtonView","ButtonClass","locale","command","commands","get","t","label","icon","IconRemoveFormat","bind","to","listenTo","execute","editing","focus","RemoveFormatCommand","Command","_customAttributesHandlers","refresh","model","isEnabled","first","_getFormattingItems","document","selection","change","writer","item","is","attributeName","_getFormattingAttributes","removeSelectionAttribute","itemRange","createRangeOn","_removeFormatting","registerCustomAttribute","isFormatting","removeFormatting","push","customHandled","removeAttribute","schema","itemHasRemovableFormatting","curRange","getRanges","getItems","isBlock","end","isTouching","createPositionAt","block","getSelectedBlocks","getAttributes","attributeProperties","getAttributeProperties","RemoveFormatEditing","RemoveFormat","requires"],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACxE,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAC1E,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AAChG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;;ACY/D,KAAA,CAAMA,aAAAA,CAAAA,CAAAA,CAAgB,CAAA,YAAA,CAAA;AAEtB,CAAA,CAAA;ADVA,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC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IrLH,CAAA,CAAA,CAAA,CAAA,CACD,MAAA,CAAA,GAAA,CAAkBE,UAAAA,CAAAA,CAAAA,CAAa;AJsLhC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CIrLL,MAAA,CAAO,CAAA,YAAA,CAAA;AACR,CAAA,CAAA,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AJqLD,CAAC,CAAC,CAAC,CAAC,CAAC;AInLH,CAAA,CAAA,CAAA,CAAA,CACD,MAAA,CAAA,GAAA,CAA2BC,gBAAAA,CAAAA,CAAAA,CAAyB;AJoLrD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CInLL,MAAA,CAAO,IAAA;AACR,CAAA,CAAA,CAAA,CAAA;AACD;;AJqLA,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CAAC,cAAc,CAAC,CAAC;AACjF,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC","file":"index.js.map","sourcesContent":["import { Plugin, Command } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { IconRemoveFormat } from '@ckeditor/ckeditor5-icons/dist/index.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\nconst REMOVE_FORMAT = 'removeFormat';\n/**\n * The remove format UI plugin. It registers the `'removeFormat'` button which can be\n * used in the toolbar.\n */ class RemoveFormatUI extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'RemoveFormatUI';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.ui.componentFactory.add(REMOVE_FORMAT, ()=>{\n const view = this._createButton(ButtonView);\n view.set({\n tooltip: true\n });\n return view;\n });\n editor.ui.componentFactory.add(`menuBar:${REMOVE_FORMAT}`, ()=>this._createButton(MenuBarMenuListItemButtonView));\n }\n /**\n\t * Creates a button for remove format command to use either in toolbar or in menu bar.\n\t */ _createButton(ButtonClass) {\n const editor = this.editor;\n const locale = editor.locale;\n const command = editor.commands.get(REMOVE_FORMAT);\n const view = new ButtonClass(editor.locale);\n const t = locale.t;\n view.set({\n label: t('Remove Format'),\n icon: IconRemoveFormat\n });\n view.bind('isEnabled').to(command, 'isEnabled');\n // Execute the command.\n this.listenTo(view, 'execute', ()=>{\n editor.execute(REMOVE_FORMAT);\n editor.editing.view.focus();\n });\n return view;\n }\n}\n\n/**\n * The remove format command.\n *\n * It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}\n * to clear the formatting in the selection.\n *\n * ```ts\n * editor.execute( 'removeFormat' );\n * ```\n */ class RemoveFormatCommand extends Command {\n /**\n\t * List of all registered custom attribute handlers.\n\t */ _customAttributesHandlers = [];\n /**\n\t * @inheritDoc\n\t */ refresh() {\n const model = this.editor.model;\n this.isEnabled = !!first(this._getFormattingItems(model.document.selection));\n }\n /**\n\t * @inheritDoc\n\t */ execute() {\n const model = this.editor.model;\n model.change((writer)=>{\n for (const item of this._getFormattingItems(model.document.selection)){\n if (item.is('selection')) {\n for (const attributeName of this._getFormattingAttributes(item)){\n writer.removeSelectionAttribute(attributeName);\n }\n } else {\n // Workaround for items with multiple removable attributes. See\n // https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609\n const itemRange = writer.createRangeOn(item);\n for (const attributeName of this._getFormattingAttributes(item)){\n this._removeFormatting(attributeName, item, itemRange, writer);\n }\n }\n }\n });\n }\n /**\n\t * Registers a custom attribute handler that will be used to determine if an attribute is formatting and how to remove it.\n\t *\n\t * @internal\n\t */ registerCustomAttribute(isFormatting, removeFormatting) {\n this._customAttributesHandlers.push({\n isFormatting,\n removeFormatting\n });\n }\n /**\n\t * Helper method that removes a formatting attribute from an item either using custom callbacks or writer remove attribute.\n\t */ _removeFormatting(attributeName, item, itemRange, writer) {\n let customHandled = false;\n for (const { isFormatting, removeFormatting } of this._customAttributesHandlers){\n if (isFormatting(attributeName, item)) {\n removeFormatting(attributeName, itemRange, writer);\n customHandled = true;\n }\n }\n if (!customHandled) {\n writer.removeAttribute(attributeName, itemRange);\n }\n }\n /**\n\t * Returns an iterable of items in a selection (including the selection itself) that have formatting model\n\t * attributes to be removed by the feature.\n\t */ *_getFormattingItems(selection) {\n const model = this.editor.model;\n const schema = model.schema;\n const itemHasRemovableFormatting = (item)=>{\n return !!first(this._getFormattingAttributes(item));\n };\n // Check formatting on selected items.\n for (const curRange of selection.getRanges()){\n for (const item of curRange.getItems()){\n // Ignore last block if range ends at the beginning of it.\n if (schema.isBlock(item) && curRange.end.isTouching(model.createPositionAt(item, 0))) {\n continue;\n }\n if (itemHasRemovableFormatting(item)) {\n yield item;\n }\n }\n }\n // Check formatting from selected blocks (to include partly selected blocks).\n for (const block of selection.getSelectedBlocks()){\n if (itemHasRemovableFormatting(block)) {\n yield block;\n }\n }\n // Finally the selection might be formatted as well, so make sure to check it.\n if (itemHasRemovableFormatting(selection)) {\n yield selection;\n }\n }\n /**\n\t * Returns an iterable of formatting attributes of a given model item.\n\t *\n\t * **Note:** Formatting items have the `isFormatting` property set to `true`.\n\t *\n\t * @returns The names of formatting attributes found in a given item.\n\t */ *_getFormattingAttributes(item) {\n const schema = this.editor.model.schema;\n for (const [attributeName] of item.getAttributes()){\n for (const { isFormatting } of this._customAttributesHandlers){\n if (isFormatting(attributeName, item)) {\n yield attributeName;\n }\n }\n const attributeProperties = schema.getAttributeProperties(attributeName);\n if (attributeProperties && attributeProperties.isFormatting) {\n yield attributeName;\n }\n }\n }\n}\n\n/**\n * The remove format editing plugin.\n *\n * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n */ class RemoveFormatEditing extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'RemoveFormatEditing';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.commands.add('removeFormat', new RemoveFormatCommand(editor));\n }\n}\n\n/**\n * The remove format plugin.\n *\n * This is a \"glue\" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}\n * and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.\n *\n * For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.\n */ class RemoveFormat extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n RemoveFormatEditing,\n RemoveFormatUI\n ];\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'RemoveFormat';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n}\n\nexport { RemoveFormat, RemoveFormatCommand, RemoveFormatEditing, RemoveFormatUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformatui\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { IconRemoveFormat } from 'ckeditor5/src/icons.js';\nimport { ButtonView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';\n\nimport { type RemoveFormatCommand } from './removeformatcommand.js';\n\nconst REMOVE_FORMAT = 'removeFormat';\n\n/**\n * The remove format UI plugin. It registers the `'removeFormat'` button which can be\n * used in the toolbar.\n */\nexport class RemoveFormatUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormatUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( REMOVE_FORMAT, () => {\n\t\t\tconst view = this._createButton( ButtonView );\n\n\t\t\tview.set( {\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( `menuBar:${ REMOVE_FORMAT }`, () => this._createButton( MenuBarMenuListItemButtonView ) );\n\t}\n\n\t/**\n\t * Creates a button for remove format command to use either in toolbar or in menu bar.\n\t */\n\tprivate _createButton<T extends typeof ButtonView | typeof MenuBarMenuListItemButtonView>( ButtonClass: T ): InstanceType<T> {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst command: RemoveFormatCommand = editor.commands.get( REMOVE_FORMAT )!;\n\t\tconst view = new ButtonClass( editor.locale ) as InstanceType<T>;\n\t\tconst t = locale.t;\n\n\t\tview.set( {\n\t\t\tlabel: t( 'Remove Format' ),\n\t\t\ticon: IconRemoveFormat\n\t\t} );\n\n\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t// Execute the command.\n\t\tthis.listenTo( view, 'execute', () => {\n\t\t\teditor.execute( REMOVE_FORMAT );\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn view;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformatcommand\n */\n\nimport type { ModelDocumentSelection, ModelItem, ModelRange, ModelWriter } from 'ckeditor5/src/engine.js';\nimport { Command } from 'ckeditor5/src/core.js';\nimport { first } from 'ckeditor5/src/utils.js';\n\n/**\n * The remove format command.\n *\n * It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}\n * to clear the formatting in the selection.\n *\n * ```ts\n * editor.execute( 'removeFormat' );\n * ```\n */\nexport class RemoveFormatCommand extends Command {\n\tdeclare public value: boolean;\n\n\t/**\n\t * List of all registered custom attribute handlers.\n\t */\n\tprivate _customAttributesHandlers: Array<{\n\t\tisFormatting: IsFormattingCallback;\n\t\tremoveFormatting: RemoveFormattingCallback;\n\t}> = [];\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\n\t\tthis.isEnabled = !!first( this._getFormattingItems( model.document.selection ) );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override execute(): void {\n\t\tconst model = this.editor.model;\n\n\t\tmodel.change( writer => {\n\t\t\tfor ( const item of this._getFormattingItems( model.document.selection ) ) {\n\t\t\t\tif ( item.is( 'selection' ) ) {\n\t\t\t\t\tfor ( const attributeName of this._getFormattingAttributes( item ) ) {\n\t\t\t\t\t\twriter.removeSelectionAttribute( attributeName );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Workaround for items with multiple removable attributes. See\n\t\t\t\t\t// https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609\n\t\t\t\t\tconst itemRange = writer.createRangeOn( item );\n\n\t\t\t\t\tfor ( const attributeName of this._getFormattingAttributes( item ) ) {\n\t\t\t\t\t\tthis._removeFormatting( attributeName, item, itemRange, writer );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a custom attribute handler that will be used to determine if an attribute is formatting and how to remove it.\n\t *\n\t * @internal\n\t */\n\tpublic registerCustomAttribute( isFormatting: IsFormattingCallback, removeFormatting: RemoveFormattingCallback ): void {\n\t\tthis._customAttributesHandlers.push( {\n\t\t\tisFormatting,\n\t\t\tremoveFormatting\n\t\t} );\n\t}\n\n\t/**\n\t * Helper method that removes a formatting attribute from an item either using custom callbacks or writer remove attribute.\n\t */\n\tprivate _removeFormatting( attributeName: string, item: ModelItem, itemRange: ModelRange, writer: ModelWriter ) {\n\t\tlet customHandled = false;\n\n\t\tfor ( const { isFormatting, removeFormatting } of this._customAttributesHandlers ) {\n\t\t\tif ( isFormatting( attributeName, item ) ) {\n\t\t\t\tremoveFormatting( attributeName, itemRange, writer );\n\t\t\t\tcustomHandled = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( !customHandled ) {\n\t\t\twriter.removeAttribute( attributeName, itemRange );\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterable of items in a selection (including the selection itself) that have formatting model\n\t * attributes to be removed by the feature.\n\t */\n\tprivate* _getFormattingItems( selection: ModelDocumentSelection ) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\n\t\tconst itemHasRemovableFormatting = ( item: ModelItem | ModelDocumentSelection ) => {\n\t\t\treturn !!first( this._getFormattingAttributes( item ) );\n\t\t};\n\n\t\t// Check formatting on selected items.\n\t\tfor ( const curRange of selection.getRanges() ) {\n\t\t\tfor ( const item of curRange.getItems() ) {\n\t\t\t\t// Ignore last block if range ends at the beginning of it.\n\t\t\t\tif ( schema.isBlock( item ) && curRange.end.isTouching( model.createPositionAt( item, 0 ) ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( itemHasRemovableFormatting( item ) ) {\n\t\t\t\t\tyield item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check formatting from selected blocks (to include partly selected blocks).\n\t\tfor ( const block of selection.getSelectedBlocks() ) {\n\t\t\tif ( itemHasRemovableFormatting( block ) ) {\n\t\t\t\tyield block;\n\t\t\t}\n\t\t}\n\n\t\t// Finally the selection might be formatted as well, so make sure to check it.\n\t\tif ( itemHasRemovableFormatting( selection ) ) {\n\t\t\tyield selection;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterable of formatting attributes of a given model item.\n\t *\n\t * **Note:** Formatting items have the `isFormatting` property set to `true`.\n\t *\n\t * @returns The names of formatting attributes found in a given item.\n\t */\n\tprivate* _getFormattingAttributes( item: ModelItem | ModelDocumentSelection ) {\n\t\tconst schema = this.editor.model.schema;\n\n\t\tfor ( const [ attributeName ] of item.getAttributes() ) {\n\t\t\tfor ( const { isFormatting } of this._customAttributesHandlers ) {\n\t\t\t\tif ( isFormatting( attributeName, item ) ) {\n\t\t\t\t\tyield attributeName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst attributeProperties = schema.getAttributeProperties( attributeName );\n\n\t\t\tif ( attributeProperties && attributeProperties.isFormatting ) {\n\t\t\t\tyield attributeName;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Callback that checks if an attribute is a formatting attribute.\n *\n * @internal\n */\nexport type IsFormattingCallback = ( attributeName: string, item: ModelItem | ModelDocumentSelection ) => boolean;\n\n/**\n * Callback that removes formatting from an item.\n *\n * @internal\n */\nexport type RemoveFormattingCallback = ( attributeName: string, range: ModelRange, writer: ModelWriter ) => void;\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformatediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\n\nimport { RemoveFormatCommand } from './removeformatcommand.js';\n\n/**\n * The remove format editing plugin.\n *\n * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n */\nexport class RemoveFormatEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormatEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.commands.add( 'removeFormat', new RemoveFormatCommand( editor ) );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module remove-format/removeformat\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\n\nimport { RemoveFormatUI } from './removeformatui.js';\nimport { RemoveFormatEditing } from './removeformatediting.js';\n\n/**\n * The remove format plugin.\n *\n * This is a \"glue\" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}\n * and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.\n *\n * For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.\n */\nexport class RemoveFormat extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ RemoveFormatEditing, RemoveFormatUI ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'RemoveFormat' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-remove-format",
3
- "version": "46.0.0-alpha.3",
3
+ "version": "46.0.0-alpha.4",
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": "46.0.0-alpha.3",
17
- "@ckeditor/ckeditor5-icons": "46.0.0-alpha.3",
18
- "@ckeditor/ckeditor5-ui": "46.0.0-alpha.3",
19
- "@ckeditor/ckeditor5-utils": "46.0.0-alpha.3",
20
- "ckeditor5": "46.0.0-alpha.3"
16
+ "@ckeditor/ckeditor5-core": "46.0.0-alpha.4",
17
+ "@ckeditor/ckeditor5-icons": "46.0.0-alpha.4",
18
+ "@ckeditor/ckeditor5-ui": "46.0.0-alpha.4",
19
+ "@ckeditor/ckeditor5-utils": "46.0.0-alpha.4",
20
+ "ckeditor5": "46.0.0-alpha.4"
21
21
  },
22
22
  "author": "CKSource (http://cksource.com/)",
23
23
  "license": "SEE LICENSE IN LICENSE.md",
@@ -44,8 +44,6 @@ export declare class RemoveFormatCommand extends Command {
44
44
  /**
45
45
  * Returns an iterable of items in a selection (including the selection itself) that have formatting model
46
46
  * attributes to be removed by the feature.
47
- *
48
- * @param schema The schema describing the item.
49
47
  */
50
48
  private _getFormattingItems;
51
49
  /**
@@ -53,7 +51,6 @@ export declare class RemoveFormatCommand extends Command {
53
51
  *
54
52
  * **Note:** Formatting items have the `isFormatting` property set to `true`.
55
53
  *
56
- * @param schema The schema describing the item.
57
54
  * @returns The names of formatting attributes found in a given item.
58
55
  */
59
56
  private _getFormattingAttributes;
@@ -24,18 +24,17 @@ export class RemoveFormatCommand extends Command {
24
24
  */
25
25
  refresh() {
26
26
  const model = this.editor.model;
27
- this.isEnabled = !!first(this._getFormattingItems(model.document.selection, model.schema));
27
+ this.isEnabled = !!first(this._getFormattingItems(model.document.selection));
28
28
  }
29
29
  /**
30
30
  * @inheritDoc
31
31
  */
32
32
  execute() {
33
33
  const model = this.editor.model;
34
- const schema = model.schema;
35
34
  model.change(writer => {
36
- for (const item of this._getFormattingItems(model.document.selection, schema)) {
35
+ for (const item of this._getFormattingItems(model.document.selection)) {
37
36
  if (item.is('selection')) {
38
- for (const attributeName of this._getFormattingAttributes(item, schema)) {
37
+ for (const attributeName of this._getFormattingAttributes(item)) {
39
38
  writer.removeSelectionAttribute(attributeName);
40
39
  }
41
40
  }
@@ -43,7 +42,7 @@ export class RemoveFormatCommand extends Command {
43
42
  // Workaround for items with multiple removable attributes. See
44
43
  // https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609
45
44
  const itemRange = writer.createRangeOn(item);
46
- for (const attributeName of this._getFormattingAttributes(item, schema)) {
45
+ for (const attributeName of this._getFormattingAttributes(item)) {
47
46
  this._removeFormatting(attributeName, item, itemRange, writer);
48
47
  }
49
48
  }
@@ -79,22 +78,26 @@ export class RemoveFormatCommand extends Command {
79
78
  /**
80
79
  * Returns an iterable of items in a selection (including the selection itself) that have formatting model
81
80
  * attributes to be removed by the feature.
82
- *
83
- * @param schema The schema describing the item.
84
81
  */
85
- *_getFormattingItems(selection, schema) {
82
+ *_getFormattingItems(selection) {
83
+ const model = this.editor.model;
84
+ const schema = model.schema;
86
85
  const itemHasRemovableFormatting = (item) => {
87
- return !!first(this._getFormattingAttributes(item, schema));
86
+ return !!first(this._getFormattingAttributes(item));
88
87
  };
89
- // Check formatting on selected items that are not blocks.
88
+ // Check formatting on selected items.
90
89
  for (const curRange of selection.getRanges()) {
91
90
  for (const item of curRange.getItems()) {
92
- if (!schema.isBlock(item) && itemHasRemovableFormatting(item)) {
91
+ // Ignore last block if range ends at the beginning of it.
92
+ if (schema.isBlock(item) && curRange.end.isTouching(model.createPositionAt(item, 0))) {
93
+ continue;
94
+ }
95
+ if (itemHasRemovableFormatting(item)) {
93
96
  yield item;
94
97
  }
95
98
  }
96
99
  }
97
- // Check formatting from selected blocks.
100
+ // Check formatting from selected blocks (to include partly selected blocks).
98
101
  for (const block of selection.getSelectedBlocks()) {
99
102
  if (itemHasRemovableFormatting(block)) {
100
103
  yield block;
@@ -110,10 +113,10 @@ export class RemoveFormatCommand extends Command {
110
113
  *
111
114
  * **Note:** Formatting items have the `isFormatting` property set to `true`.
112
115
  *
113
- * @param schema The schema describing the item.
114
116
  * @returns The names of formatting attributes found in a given item.
115
117
  */
116
- *_getFormattingAttributes(item, schema) {
118
+ *_getFormattingAttributes(item) {
119
+ const schema = this.editor.model.schema;
117
120
  for (const [attributeName] of item.getAttributes()) {
118
121
  for (const { isFormatting } of this._customAttributesHandlers) {
119
122
  if (isFormatting(attributeName, item)) {