@ckeditor/ckeditor5-remove-format 41.1.0 → 41.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/remove-format.js +1 -1
- package/dist/content-index.css +4 -0
- package/dist/editor-index.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.js +207 -0
- package/dist/index.js.map +1 -0
- package/dist/types/augmentation.d.ts +15 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/removeformat.d.ts +28 -0
- package/dist/types/removeformatcommand.d.ts +42 -0
- package/dist/types/removeformatediting.d.ts +23 -0
- package/dist/types/removeformatui.d.ts +22 -0
- package/lang/translations/he.po +1 -1
- package/package.json +3 -2
package/build/remove-format.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={
|
|
5
|
+
*/(()=>{var t={782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},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:()=>m,RemoveFormatEditing:()=>c,RemoveFormatUI:()=>s});var t=o(782),e=o(311);const i="removeFormat";class s extends t.Plugin{static get pluginName(){return"RemoveFormatUI"}init(){const t=this.editor,o=t.t;t.ui.componentFactory.add(i,(r=>{const s=t.commands.get(i),n=new e.ButtonView(r);return n.set({label:o("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>',tooltip:!0}),n.bind("isOn","isEnabled").to(s,"value","isEnabled"),this.listenTo(n,"execute",(()=>{t.execute(i),t.editing.view.focus()})),n}))}}var n=o(584);class a extends t.Command{refresh(){const t=this.editor.model;this.isEnabled=!!(0,n.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))o.removeAttribute(i,t)}}))}*_getFormattingItems(t,e){const o=t=>!!(0,n.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()){const t=e.getAttributeProperties(o);t&&t.isFormatting&&(yield o)}}}class c extends t.Plugin{static get pluginName(){return"RemoveFormatEditing"}init(){const t=this.editor;t.commands.add("removeFormat",new a(t))}}class m extends t.Plugin{static get requires(){return[c,s]}static get pluginName(){return"RemoveFormat"}}})(),(window.CKEditor5=window.CKEditor5||{}).removeFormat=r})();
|
package/dist/index.css
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import { Plugin, Command } from '@ckeditor/ckeditor5-core/dist/index.js';
|
|
6
|
+
import { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
|
7
|
+
import { first } from '@ckeditor/ckeditor5-utils/dist/index.js';
|
|
8
|
+
|
|
9
|
+
var removeFormatIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z\"/></svg>";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
13
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* @module remove-format/removeformatui
|
|
17
|
+
*/
|
|
18
|
+
const REMOVE_FORMAT = 'removeFormat';
|
|
19
|
+
/**
|
|
20
|
+
* The remove format UI plugin. It registers the `'removeFormat'` button which can be
|
|
21
|
+
* used in the toolbar.
|
|
22
|
+
*/
|
|
23
|
+
class RemoveFormatUI extends Plugin {
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get pluginName() {
|
|
28
|
+
return 'RemoveFormatUI';
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init() {
|
|
34
|
+
const editor = this.editor;
|
|
35
|
+
const t = editor.t;
|
|
36
|
+
editor.ui.componentFactory.add(REMOVE_FORMAT, locale => {
|
|
37
|
+
const command = editor.commands.get(REMOVE_FORMAT);
|
|
38
|
+
const view = new ButtonView(locale);
|
|
39
|
+
view.set({
|
|
40
|
+
label: t('Remove Format'),
|
|
41
|
+
icon: removeFormatIcon,
|
|
42
|
+
tooltip: true
|
|
43
|
+
});
|
|
44
|
+
view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
|
|
45
|
+
// Execute the command.
|
|
46
|
+
this.listenTo(view, 'execute', () => {
|
|
47
|
+
editor.execute(REMOVE_FORMAT);
|
|
48
|
+
editor.editing.view.focus();
|
|
49
|
+
});
|
|
50
|
+
return view;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
57
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* The remove format command.
|
|
61
|
+
*
|
|
62
|
+
* It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}
|
|
63
|
+
* to clear the formatting in the selection.
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* editor.execute( 'removeFormat' );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
class RemoveFormatCommand extends Command {
|
|
70
|
+
/**
|
|
71
|
+
* @inheritDoc
|
|
72
|
+
*/
|
|
73
|
+
refresh() {
|
|
74
|
+
const model = this.editor.model;
|
|
75
|
+
this.isEnabled = !!first(this._getFormattingItems(model.document.selection, model.schema));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @inheritDoc
|
|
79
|
+
*/
|
|
80
|
+
execute() {
|
|
81
|
+
const model = this.editor.model;
|
|
82
|
+
const schema = model.schema;
|
|
83
|
+
model.change(writer => {
|
|
84
|
+
for (const item of this._getFormattingItems(model.document.selection, schema)) {
|
|
85
|
+
if (item.is('selection')) {
|
|
86
|
+
for (const attributeName of this._getFormattingAttributes(item, schema)) {
|
|
87
|
+
writer.removeSelectionAttribute(attributeName);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
// Workaround for items with multiple removable attributes. See
|
|
92
|
+
// https://github.com/ckeditor/ckeditor5-remove-format/pull/1#pullrequestreview-220515609
|
|
93
|
+
const itemRange = writer.createRangeOn(item);
|
|
94
|
+
for (const attributeName of this._getFormattingAttributes(item, schema)) {
|
|
95
|
+
writer.removeAttribute(attributeName, itemRange);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Returns an iterable of items in a selection (including the selection itself) that have formatting model
|
|
103
|
+
* attributes to be removed by the feature.
|
|
104
|
+
*
|
|
105
|
+
* @param schema The schema describing the item.
|
|
106
|
+
*/
|
|
107
|
+
*_getFormattingItems(selection, schema) {
|
|
108
|
+
const itemHasRemovableFormatting = (item) => {
|
|
109
|
+
return !!first(this._getFormattingAttributes(item, schema));
|
|
110
|
+
};
|
|
111
|
+
// Check formatting on selected items that are not blocks.
|
|
112
|
+
for (const curRange of selection.getRanges()) {
|
|
113
|
+
for (const item of curRange.getItems()) {
|
|
114
|
+
if (!schema.isBlock(item) && itemHasRemovableFormatting(item)) {
|
|
115
|
+
yield item;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Check formatting from selected blocks.
|
|
120
|
+
for (const block of selection.getSelectedBlocks()) {
|
|
121
|
+
if (itemHasRemovableFormatting(block)) {
|
|
122
|
+
yield block;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Finally the selection might be formatted as well, so make sure to check it.
|
|
126
|
+
if (itemHasRemovableFormatting(selection)) {
|
|
127
|
+
yield selection;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Returns an iterable of formatting attributes of a given model item.
|
|
132
|
+
*
|
|
133
|
+
* **Note:** Formatting items have the `isFormatting` property set to `true`.
|
|
134
|
+
*
|
|
135
|
+
* @param schema The schema describing the item.
|
|
136
|
+
* @returns The names of formatting attributes found in a given item.
|
|
137
|
+
*/
|
|
138
|
+
*_getFormattingAttributes(item, schema) {
|
|
139
|
+
for (const [attributeName] of item.getAttributes()) {
|
|
140
|
+
const attributeProperties = schema.getAttributeProperties(attributeName);
|
|
141
|
+
if (attributeProperties && attributeProperties.isFormatting) {
|
|
142
|
+
yield attributeName;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
150
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
151
|
+
*/
|
|
152
|
+
/**
|
|
153
|
+
* @module remove-format/removeformatediting
|
|
154
|
+
*/
|
|
155
|
+
/**
|
|
156
|
+
* The remove format editing plugin.
|
|
157
|
+
*
|
|
158
|
+
* It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.
|
|
159
|
+
*/
|
|
160
|
+
class RemoveFormatEditing extends Plugin {
|
|
161
|
+
/**
|
|
162
|
+
* @inheritDoc
|
|
163
|
+
*/
|
|
164
|
+
static get pluginName() {
|
|
165
|
+
return 'RemoveFormatEditing';
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* @inheritDoc
|
|
169
|
+
*/
|
|
170
|
+
init() {
|
|
171
|
+
const editor = this.editor;
|
|
172
|
+
editor.commands.add('removeFormat', new RemoveFormatCommand(editor));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
178
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
179
|
+
*/
|
|
180
|
+
/**
|
|
181
|
+
* @module remove-format/removeformat
|
|
182
|
+
*/
|
|
183
|
+
/**
|
|
184
|
+
* The remove format plugin.
|
|
185
|
+
*
|
|
186
|
+
* This is a "glue" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}
|
|
187
|
+
* and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.
|
|
188
|
+
*
|
|
189
|
+
* For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.
|
|
190
|
+
*/
|
|
191
|
+
class RemoveFormat extends Plugin {
|
|
192
|
+
/**
|
|
193
|
+
* @inheritDoc
|
|
194
|
+
*/
|
|
195
|
+
static get requires() {
|
|
196
|
+
return [RemoveFormatEditing, RemoveFormatUI];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* @inheritDoc
|
|
200
|
+
*/
|
|
201
|
+
static get pluginName() {
|
|
202
|
+
return 'RemoveFormat';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export { RemoveFormat, RemoveFormatEditing, RemoveFormatUI };
|
|
207
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js","../src/removeformatui.ts","../src/removeformatcommand.ts","../src/removeformatediting.ts","../src/removeformat.ts"],"names":[],"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,CAAC;AACzE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAClE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAChE;AACA,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GA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AC,EAAE,CAAC,GAAG","file":"index.js.map","sourcesContent":["import { Plugin, Command } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\nvar removeFormatIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z\\\"/></svg>\";\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module remove-format/removeformatui\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 */\nclass RemoveFormatUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'RemoveFormatUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const t = editor.t;\n editor.ui.componentFactory.add(REMOVE_FORMAT, locale => {\n const command = editor.commands.get(REMOVE_FORMAT);\n const view = new ButtonView(locale);\n view.set({\n label: t('Remove Format'),\n icon: removeFormatIcon,\n tooltip: true\n });\n view.bind('isOn', 'isEnabled').to(command, 'value', '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/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\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 */\nclass RemoveFormatCommand extends Command {\n /**\n * @inheritDoc\n */\n refresh() {\n const model = this.editor.model;\n this.isEnabled = !!first(this._getFormattingItems(model.document.selection, model.schema));\n }\n /**\n * @inheritDoc\n */\n 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 }\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 writer.removeAttribute(attributeName, itemRange);\n }\n }\n }\n });\n }\n /**\n * Returns an iterable of items in a selection (including the selection itself) that have formatting model\n * attributes to be removed by the feature.\n *\n * @param schema The schema describing the item.\n */\n *_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 * Returns an iterable of formatting attributes of a given model item.\n *\n * **Note:** Formatting items have the `isFormatting` property set to `true`.\n *\n * @param schema The schema describing the item.\n * @returns The names of formatting attributes found in a given item.\n */\n *_getFormattingAttributes(item, schema) {\n for (const [attributeName] of item.getAttributes()) {\n const attributeProperties = schema.getAttributeProperties(attributeName);\n if (attributeProperties && attributeProperties.isFormatting) {\n yield attributeName;\n }\n }\n }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module remove-format/removeformatediting\n */\n/**\n * The remove format editing plugin.\n *\n * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.\n */\nclass RemoveFormatEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'RemoveFormatEditing';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n editor.commands.add('removeFormat', new RemoveFormatCommand(editor));\n }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module remove-format/removeformat\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 */\nclass RemoveFormat extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [RemoveFormatEditing, RemoveFormatUI];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'RemoveFormat';\n }\n}\n\nexport { RemoveFormat, RemoveFormatEditing, RemoveFormatUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module remove-format/removeformatui\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\n\nimport type RemoveFormatCommand from './removeformatcommand.js';\n\nimport removeFormatIcon from '../theme/icons/remove-format.svg';\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 default 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 init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( REMOVE_FORMAT, locale => {\n\t\t\tconst command: RemoveFormatCommand = editor.commands.get( REMOVE_FORMAT )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel: t( 'Remove Format' ),\n\t\t\t\ticon: removeFormatIcon,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );\n\n\t\t\t// Execute the command.\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\teditor.execute( REMOVE_FORMAT );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module remove-format/removeformatcommand\n */\n\nimport type { DocumentSelection, Item, Schema } 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 default class RemoveFormatCommand extends Command {\n\tdeclare public value: boolean;\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\twriter.removeAttribute( attributeName, itemRange );\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 * 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: DocumentSelection, schema: Schema ) {\n\t\tconst itemHasRemovableFormatting = ( item: Item | DocumentSelection ) => {\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: Item | DocumentSelection, schema: Schema ) {\n\t\tfor ( const [ attributeName ] of item.getAttributes() ) {\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 * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\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 default 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 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-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\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 default 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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { RemoveFormat, RemoveFormatEditing, RemoveFormatUI, RemoveFormatCommand } from './index.js';
|
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
7
|
+
interface PluginsMap {
|
|
8
|
+
[RemoveFormat.pluginName]: RemoveFormat;
|
|
9
|
+
[RemoveFormatUI.pluginName]: RemoveFormatUI;
|
|
10
|
+
[RemoveFormatEditing.pluginName]: RemoveFormatEditing;
|
|
11
|
+
}
|
|
12
|
+
interface CommandsMap {
|
|
13
|
+
removeFormat: RemoveFormatCommand;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module remove-format
|
|
7
|
+
*/
|
|
8
|
+
export { default as RemoveFormat } from './removeformat.js';
|
|
9
|
+
export { default as RemoveFormatEditing } from './removeformatediting.js';
|
|
10
|
+
export { default as RemoveFormatUI } from './removeformatui.js';
|
|
11
|
+
export type { default as RemoveFormatCommand } from './removeformatcommand.js';
|
|
12
|
+
import './augmentation.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module remove-format/removeformat
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import RemoveFormatUI from './removeformatui.js';
|
|
10
|
+
import RemoveFormatEditing from './removeformatediting.js';
|
|
11
|
+
/**
|
|
12
|
+
* The remove format plugin.
|
|
13
|
+
*
|
|
14
|
+
* This is a "glue" plugin which loads the {@link module:remove-format/removeformatediting~RemoveFormatEditing}
|
|
15
|
+
* and {@link module:remove-format/removeformatui~RemoveFormatUI} plugins.
|
|
16
|
+
*
|
|
17
|
+
* For a detailed overview, check out the {@glink features/remove-format remove format} feature documentation.
|
|
18
|
+
*/
|
|
19
|
+
export default class RemoveFormat extends Plugin {
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): readonly [typeof RemoveFormatEditing, typeof RemoveFormatUI];
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get pluginName(): "RemoveFormat";
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
6
|
+
/**
|
|
7
|
+
* The remove format command.
|
|
8
|
+
*
|
|
9
|
+
* It is used by the {@link module:remove-format/removeformat~RemoveFormat remove format feature}
|
|
10
|
+
* to clear the formatting in the selection.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* editor.execute( 'removeFormat' );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export default class RemoveFormatCommand extends Command {
|
|
17
|
+
value: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
refresh(): void;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
execute(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Returns an iterable of items in a selection (including the selection itself) that have formatting model
|
|
28
|
+
* attributes to be removed by the feature.
|
|
29
|
+
*
|
|
30
|
+
* @param schema The schema describing the item.
|
|
31
|
+
*/
|
|
32
|
+
private _getFormattingItems;
|
|
33
|
+
/**
|
|
34
|
+
* Returns an iterable of formatting attributes of a given model item.
|
|
35
|
+
*
|
|
36
|
+
* **Note:** Formatting items have the `isFormatting` property set to `true`.
|
|
37
|
+
*
|
|
38
|
+
* @param schema The schema describing the item.
|
|
39
|
+
* @returns The names of formatting attributes found in a given item.
|
|
40
|
+
*/
|
|
41
|
+
private _getFormattingAttributes;
|
|
42
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module remove-format/removeformatediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The remove format editing plugin.
|
|
11
|
+
*
|
|
12
|
+
* It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.
|
|
13
|
+
*/
|
|
14
|
+
export default class RemoveFormatEditing extends Plugin {
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get pluginName(): "RemoveFormatEditing";
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
init(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module remove-format/removeformatui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The remove format UI plugin. It registers the `'removeFormat'` button which can be
|
|
11
|
+
* used in the toolbar.
|
|
12
|
+
*/
|
|
13
|
+
export default class RemoveFormatUI extends Plugin {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get pluginName(): "RemoveFormatUI";
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
init(): void;
|
|
22
|
+
}
|
package/lang/translations/he.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
|
|
16
16
|
"Language: he\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;\n"
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
19
|
|
|
20
20
|
msgctxt "The label of the remove format toolbar button."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-remove-format",
|
|
3
|
-
"version": "41.
|
|
3
|
+
"version": "41.3.0-alpha.0",
|
|
4
4
|
"description": "Remove format feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"ckeditor5": "41.
|
|
16
|
+
"ckeditor5": "41.3.0-alpha.0"
|
|
17
17
|
},
|
|
18
18
|
"author": "CKSource (http://cksource.com/)",
|
|
19
19
|
"license": "GPL-2.0-or-later",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"directory": "packages/ckeditor5-remove-format"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
+
"dist",
|
|
28
29
|
"lang",
|
|
29
30
|
"src/**/*.js",
|
|
30
31
|
"src/**/*.d.ts",
|