@ckeditor/ckeditor5-block-quote 41.2.0 → 41.3.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/content-index.css +17 -0
- package/dist/editor-index.css +4 -0
- package/dist/index.css +29 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +378 -0
- package/dist/index.js.map +1 -0
- package/dist/types/augmentation.d.ts +15 -0
- package/dist/types/blockquote.d.ts +30 -0
- package/dist/types/blockquotecommand.d.ts +61 -0
- package/dist/types/blockquoteediting.d.ts +31 -0
- package/dist/types/blockquoteui.d.ts +26 -0
- package/dist/types/index.d.ts +12 -0
- package/package.json +3 -2
@@ -0,0 +1,17 @@
|
|
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
|
+
.ck-content blockquote {
|
6
|
+
overflow: hidden;
|
7
|
+
padding-right: 1.5em;
|
8
|
+
padding-left: 1.5em;
|
9
|
+
margin-left: 0;
|
10
|
+
margin-right: 0;
|
11
|
+
font-style: italic;
|
12
|
+
border-left: solid 5px hsl(0, 0%, 80%);
|
13
|
+
}
|
14
|
+
.ck-content[dir="rtl"] blockquote {
|
15
|
+
border-left: 0;
|
16
|
+
border-right: solid 5px hsl(0, 0%, 80%);
|
17
|
+
}
|
package/dist/index.css
ADDED
@@ -0,0 +1,29 @@
|
|
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
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
+
*/
|
9
|
+
|
10
|
+
.ck-content blockquote {
|
11
|
+
/* See #12 */
|
12
|
+
overflow: hidden;
|
13
|
+
|
14
|
+
/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */
|
15
|
+
padding-right: 1.5em;
|
16
|
+
padding-left: 1.5em;
|
17
|
+
|
18
|
+
margin-left: 0;
|
19
|
+
margin-right: 0;
|
20
|
+
font-style: italic;
|
21
|
+
border-left: solid 5px hsl(0, 0%, 80%);
|
22
|
+
}
|
23
|
+
|
24
|
+
.ck-content[dir="rtl"] blockquote {
|
25
|
+
border-left: 0;
|
26
|
+
border-right: solid 5px hsl(0, 0%, 80%);
|
27
|
+
}
|
28
|
+
|
29
|
+
/*# sourceMappingURL=index.css.map */
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../theme/blockquote.css","index.css"],"names":[],"mappings":";;;;AAAA,CAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC5E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO;AACnF,CAAC,CDAC,CAAA;ACCF;ADCA,CAAA,EAAA,CAAA,OAAA,CAAA,UAAA,CAAA,CAAA;ACCA,CDAC,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,EAAA,CAAA,CAAY,CAAA;ACCb,CDAC,QAAA,CAAA,CAAA,MAAgB,CAAA;ACCjB;AACA,CDAC,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,MAAA,CAAA,GAAA,CAAA,QAAA,CAAA,SAAA,CAAA,KAAA,CAAA,KAAA,CAAA,MAAA,CAAA,EAAA,CAAA,CAAgE,CAAA;ACCjE,CDAC,OAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAoB,CAAA;ACCrB,CDAC,OAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,GAAmB,CAAA;ACCpB;AACA,CDAC,MAAA,CAAA,IAAA,CAAA,CAAA,CAAc,CAAA;ACCf,CDAC,MAAA,CAAA,KAAA,CAAA,CAAA,CAAe,CAAA;ACChB,CDAC,IAAA,CAAA,KAAA,CAAA,CAAA,MAAkB,CAAA;ACCnB,CDAC,MAAA,CAAA,IAAA,CAAA,CAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAsC,CAAA;AACvC,CAAA;ACCA;ADCA,CAAA,EAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,UAAA,CAAA,CAAA;ACCA,CDAC,MAAA,CAAA,IAAA,CAAA,CAAA,CAAc,CAAA;ACCf,CDAC,MAAA,CAAA,KAAA,CAAA,CAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAuC,CAAA;AACxC,CAAA;ACCA;AACA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * 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.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir=\"rtl\"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n","/*\n * 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.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir=\"rtl\"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n\n/*# sourceMappingURL=index.css.map */"]}
|
package/dist/index.js
ADDED
@@ -0,0 +1,378 @@
|
|
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, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';
|
6
|
+
import { Enter } from '@ckeditor/ckeditor5-enter/dist/index.js';
|
7
|
+
import { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';
|
8
|
+
import { first } from '@ckeditor/ckeditor5-utils/dist/index.js';
|
9
|
+
import { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
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 block-quote/blockquotecommand
|
17
|
+
*/
|
18
|
+
/**
|
19
|
+
* The block quote command plugin.
|
20
|
+
*
|
21
|
+
* @extends module:core/command~Command
|
22
|
+
*/
|
23
|
+
class BlockQuoteCommand extends Command {
|
24
|
+
/**
|
25
|
+
* @inheritDoc
|
26
|
+
*/
|
27
|
+
refresh() {
|
28
|
+
this.value = this._getValue();
|
29
|
+
this.isEnabled = this._checkEnabled();
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* Executes the command. When the command {@link #value is on}, all top-most block quotes within
|
33
|
+
* the selection will be removed. If it is off, all selected blocks will be wrapped with
|
34
|
+
* a block quote.
|
35
|
+
*
|
36
|
+
* @fires execute
|
37
|
+
* @param options Command options.
|
38
|
+
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,
|
39
|
+
* otherwise the command will remove the block quote. If not set, the command will act basing on its current value.
|
40
|
+
*/
|
41
|
+
execute(options = {}) {
|
42
|
+
const model = this.editor.model;
|
43
|
+
const schema = model.schema;
|
44
|
+
const selection = model.document.selection;
|
45
|
+
const blocks = Array.from(selection.getSelectedBlocks());
|
46
|
+
const value = (options.forceValue === undefined) ? !this.value : options.forceValue;
|
47
|
+
model.change(writer => {
|
48
|
+
if (!value) {
|
49
|
+
this._removeQuote(writer, blocks.filter(findQuote));
|
50
|
+
}
|
51
|
+
else {
|
52
|
+
const blocksToQuote = blocks.filter(block => {
|
53
|
+
// Already quoted blocks needs to be considered while quoting too
|
54
|
+
// in order to reuse their <bQ> elements.
|
55
|
+
return findQuote(block) || checkCanBeQuoted(schema, block);
|
56
|
+
});
|
57
|
+
this._applyQuote(writer, blocksToQuote);
|
58
|
+
}
|
59
|
+
});
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* Checks the command's {@link #value}.
|
63
|
+
*/
|
64
|
+
_getValue() {
|
65
|
+
const selection = this.editor.model.document.selection;
|
66
|
+
const firstBlock = first(selection.getSelectedBlocks());
|
67
|
+
// In the current implementation, the block quote must be an immediate parent of a block element.
|
68
|
+
return !!(firstBlock && findQuote(firstBlock));
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Checks whether the command can be enabled in the current context.
|
72
|
+
*
|
73
|
+
* @returns Whether the command should be enabled.
|
74
|
+
*/
|
75
|
+
_checkEnabled() {
|
76
|
+
if (this.value) {
|
77
|
+
return true;
|
78
|
+
}
|
79
|
+
const selection = this.editor.model.document.selection;
|
80
|
+
const schema = this.editor.model.schema;
|
81
|
+
const firstBlock = first(selection.getSelectedBlocks());
|
82
|
+
if (!firstBlock) {
|
83
|
+
return false;
|
84
|
+
}
|
85
|
+
return checkCanBeQuoted(schema, firstBlock);
|
86
|
+
}
|
87
|
+
/**
|
88
|
+
* Removes the quote from given blocks.
|
89
|
+
*
|
90
|
+
* If blocks which are supposed to be "unquoted" are in the middle of a quote,
|
91
|
+
* start it or end it, then the quote will be split (if needed) and the blocks
|
92
|
+
* will be moved out of it, so other quoted blocks remained quoted.
|
93
|
+
*/
|
94
|
+
_removeQuote(writer, blocks) {
|
95
|
+
// Unquote all groups of block. Iterate in the reverse order to not break following ranges.
|
96
|
+
getRangesOfBlockGroups(writer, blocks).reverse().forEach(groupRange => {
|
97
|
+
if (groupRange.start.isAtStart && groupRange.end.isAtEnd) {
|
98
|
+
writer.unwrap(groupRange.start.parent);
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
// The group of blocks are at the beginning of an <bQ> so let's move them left (out of the <bQ>).
|
102
|
+
if (groupRange.start.isAtStart) {
|
103
|
+
const positionBefore = writer.createPositionBefore(groupRange.start.parent);
|
104
|
+
writer.move(groupRange, positionBefore);
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
// The blocks are in the middle of an <bQ> so we need to split the <bQ> after the last block
|
108
|
+
// so we move the items there.
|
109
|
+
if (!groupRange.end.isAtEnd) {
|
110
|
+
writer.split(groupRange.end);
|
111
|
+
}
|
112
|
+
// Now we are sure that groupRange.end.isAtEnd is true, so let's move the blocks right.
|
113
|
+
const positionAfter = writer.createPositionAfter(groupRange.end.parent);
|
114
|
+
writer.move(groupRange, positionAfter);
|
115
|
+
});
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Applies the quote to given blocks.
|
119
|
+
*/
|
120
|
+
_applyQuote(writer, blocks) {
|
121
|
+
const quotesToMerge = [];
|
122
|
+
// Quote all groups of block. Iterate in the reverse order to not break following ranges.
|
123
|
+
getRangesOfBlockGroups(writer, blocks).reverse().forEach(groupRange => {
|
124
|
+
let quote = findQuote(groupRange.start);
|
125
|
+
if (!quote) {
|
126
|
+
quote = writer.createElement('blockQuote');
|
127
|
+
writer.wrap(groupRange, quote);
|
128
|
+
}
|
129
|
+
quotesToMerge.push(quote);
|
130
|
+
});
|
131
|
+
// Merge subsequent <bQ> elements. Reverse the order again because this time we want to go through
|
132
|
+
// the <bQ> elements in the source order (due to how merge works – it moves the right element's content
|
133
|
+
// to the first element and removes the right one. Since we may need to merge a couple of subsequent `<bQ>` elements
|
134
|
+
// we want to keep the reference to the first (furthest left) one.
|
135
|
+
quotesToMerge.reverse().reduce((currentQuote, nextQuote) => {
|
136
|
+
if (currentQuote.nextSibling == nextQuote) {
|
137
|
+
writer.merge(writer.createPositionAfter(currentQuote));
|
138
|
+
return currentQuote;
|
139
|
+
}
|
140
|
+
return nextQuote;
|
141
|
+
});
|
142
|
+
}
|
143
|
+
}
|
144
|
+
function findQuote(elementOrPosition) {
|
145
|
+
return elementOrPosition.parent.name == 'blockQuote' ? elementOrPosition.parent : null;
|
146
|
+
}
|
147
|
+
/**
|
148
|
+
* Returns a minimal array of ranges containing groups of subsequent blocks.
|
149
|
+
*
|
150
|
+
* content: abcdefgh
|
151
|
+
* blocks: [ a, b, d, f, g, h ]
|
152
|
+
* output ranges: [ab]c[d]e[fgh]
|
153
|
+
*/
|
154
|
+
function getRangesOfBlockGroups(writer, blocks) {
|
155
|
+
let startPosition;
|
156
|
+
let i = 0;
|
157
|
+
const ranges = [];
|
158
|
+
while (i < blocks.length) {
|
159
|
+
const block = blocks[i];
|
160
|
+
const nextBlock = blocks[i + 1];
|
161
|
+
if (!startPosition) {
|
162
|
+
startPosition = writer.createPositionBefore(block);
|
163
|
+
}
|
164
|
+
if (!nextBlock || block.nextSibling != nextBlock) {
|
165
|
+
ranges.push(writer.createRange(startPosition, writer.createPositionAfter(block)));
|
166
|
+
startPosition = null;
|
167
|
+
}
|
168
|
+
i++;
|
169
|
+
}
|
170
|
+
return ranges;
|
171
|
+
}
|
172
|
+
/**
|
173
|
+
* Checks whether <bQ> can wrap the block.
|
174
|
+
*/
|
175
|
+
function checkCanBeQuoted(schema, block) {
|
176
|
+
// TMP will be replaced with schema.checkWrap().
|
177
|
+
const isBQAllowed = schema.checkChild(block.parent, 'blockQuote');
|
178
|
+
const isBlockAllowedInBQ = schema.checkChild(['$root', 'blockQuote'], block);
|
179
|
+
return isBQAllowed && isBlockAllowedInBQ;
|
180
|
+
}
|
181
|
+
|
182
|
+
/**
|
183
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
184
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
185
|
+
*/
|
186
|
+
/**
|
187
|
+
* @module block-quote/blockquoteediting
|
188
|
+
*/
|
189
|
+
/**
|
190
|
+
* The block quote editing.
|
191
|
+
*
|
192
|
+
* Introduces the `'blockQuote'` command and the `'blockQuote'` model element.
|
193
|
+
*
|
194
|
+
* @extends module:core/plugin~Plugin
|
195
|
+
*/
|
196
|
+
class BlockQuoteEditing extends Plugin {
|
197
|
+
/**
|
198
|
+
* @inheritDoc
|
199
|
+
*/
|
200
|
+
static get pluginName() {
|
201
|
+
return 'BlockQuoteEditing';
|
202
|
+
}
|
203
|
+
/**
|
204
|
+
* @inheritDoc
|
205
|
+
*/
|
206
|
+
static get requires() {
|
207
|
+
return [Enter, Delete];
|
208
|
+
}
|
209
|
+
/**
|
210
|
+
* @inheritDoc
|
211
|
+
*/
|
212
|
+
init() {
|
213
|
+
const editor = this.editor;
|
214
|
+
const schema = editor.model.schema;
|
215
|
+
editor.commands.add('blockQuote', new BlockQuoteCommand(editor));
|
216
|
+
schema.register('blockQuote', {
|
217
|
+
inheritAllFrom: '$container'
|
218
|
+
});
|
219
|
+
editor.conversion.elementToElement({ model: 'blockQuote', view: 'blockquote' });
|
220
|
+
// Postfixer which cleans incorrect model states connected with block quotes.
|
221
|
+
editor.model.document.registerPostFixer(writer => {
|
222
|
+
const changes = editor.model.document.differ.getChanges();
|
223
|
+
for (const entry of changes) {
|
224
|
+
if (entry.type == 'insert') {
|
225
|
+
const element = entry.position.nodeAfter;
|
226
|
+
if (!element) {
|
227
|
+
// We are inside a text node.
|
228
|
+
continue;
|
229
|
+
}
|
230
|
+
if (element.is('element', 'blockQuote') && element.isEmpty) {
|
231
|
+
// Added an empty blockQuote - remove it.
|
232
|
+
writer.remove(element);
|
233
|
+
return true;
|
234
|
+
}
|
235
|
+
else if (element.is('element', 'blockQuote') && !schema.checkChild(entry.position, element)) {
|
236
|
+
// Added a blockQuote in incorrect place. Unwrap it so the content inside is not lost.
|
237
|
+
writer.unwrap(element);
|
238
|
+
return true;
|
239
|
+
}
|
240
|
+
else if (element.is('element')) {
|
241
|
+
// Just added an element. Check that all children meet the scheme rules.
|
242
|
+
const range = writer.createRangeIn(element);
|
243
|
+
for (const child of range.getItems()) {
|
244
|
+
if (child.is('element', 'blockQuote') &&
|
245
|
+
!schema.checkChild(writer.createPositionBefore(child), child)) {
|
246
|
+
writer.unwrap(child);
|
247
|
+
return true;
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
}
|
252
|
+
else if (entry.type == 'remove') {
|
253
|
+
const parent = entry.position.parent;
|
254
|
+
if (parent.is('element', 'blockQuote') && parent.isEmpty) {
|
255
|
+
// Something got removed and now blockQuote is empty. Remove the blockQuote as well.
|
256
|
+
writer.remove(parent);
|
257
|
+
return true;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
261
|
+
return false;
|
262
|
+
});
|
263
|
+
const viewDocument = this.editor.editing.view.document;
|
264
|
+
const selection = editor.model.document.selection;
|
265
|
+
const blockQuoteCommand = editor.commands.get('blockQuote');
|
266
|
+
// Overwrite default Enter key behavior.
|
267
|
+
// If Enter key is pressed with selection collapsed in empty block inside a quote, break the quote.
|
268
|
+
this.listenTo(viewDocument, 'enter', (evt, data) => {
|
269
|
+
if (!selection.isCollapsed || !blockQuoteCommand.value) {
|
270
|
+
return;
|
271
|
+
}
|
272
|
+
const positionParent = selection.getLastPosition().parent;
|
273
|
+
if (positionParent.isEmpty) {
|
274
|
+
editor.execute('blockQuote');
|
275
|
+
editor.editing.view.scrollToTheSelection();
|
276
|
+
data.preventDefault();
|
277
|
+
evt.stop();
|
278
|
+
}
|
279
|
+
}, { context: 'blockquote' });
|
280
|
+
// Overwrite default Backspace key behavior.
|
281
|
+
// If Backspace key is pressed with selection collapsed in first empty block inside a quote, break the quote.
|
282
|
+
this.listenTo(viewDocument, 'delete', (evt, data) => {
|
283
|
+
if (data.direction != 'backward' || !selection.isCollapsed || !blockQuoteCommand.value) {
|
284
|
+
return;
|
285
|
+
}
|
286
|
+
const positionParent = selection.getLastPosition().parent;
|
287
|
+
if (positionParent.isEmpty && !positionParent.previousSibling) {
|
288
|
+
editor.execute('blockQuote');
|
289
|
+
editor.editing.view.scrollToTheSelection();
|
290
|
+
data.preventDefault();
|
291
|
+
evt.stop();
|
292
|
+
}
|
293
|
+
}, { context: 'blockquote' });
|
294
|
+
}
|
295
|
+
}
|
296
|
+
|
297
|
+
/**
|
298
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
299
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
300
|
+
*/
|
301
|
+
/**
|
302
|
+
* @module block-quote/blockquoteui
|
303
|
+
*/
|
304
|
+
/**
|
305
|
+
* The block quote UI plugin.
|
306
|
+
*
|
307
|
+
* It introduces the `'blockQuote'` button.
|
308
|
+
*
|
309
|
+
* @extends module:core/plugin~Plugin
|
310
|
+
*/
|
311
|
+
class BlockQuoteUI extends Plugin {
|
312
|
+
/**
|
313
|
+
* @inheritDoc
|
314
|
+
*/
|
315
|
+
static get pluginName() {
|
316
|
+
return 'BlockQuoteUI';
|
317
|
+
}
|
318
|
+
/**
|
319
|
+
* @inheritDoc
|
320
|
+
*/
|
321
|
+
init() {
|
322
|
+
const editor = this.editor;
|
323
|
+
const t = editor.t;
|
324
|
+
editor.ui.componentFactory.add('blockQuote', locale => {
|
325
|
+
const command = editor.commands.get('blockQuote');
|
326
|
+
const buttonView = new ButtonView(locale);
|
327
|
+
buttonView.set({
|
328
|
+
label: t('Block quote'),
|
329
|
+
icon: icons.quote,
|
330
|
+
tooltip: true,
|
331
|
+
isToggleable: true
|
332
|
+
});
|
333
|
+
// Bind button model to command.
|
334
|
+
buttonView.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
|
335
|
+
// Execute command.
|
336
|
+
this.listenTo(buttonView, 'execute', () => {
|
337
|
+
editor.execute('blockQuote');
|
338
|
+
editor.editing.view.focus();
|
339
|
+
});
|
340
|
+
return buttonView;
|
341
|
+
});
|
342
|
+
}
|
343
|
+
}
|
344
|
+
|
345
|
+
/**
|
346
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
347
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
348
|
+
*/
|
349
|
+
/**
|
350
|
+
* @module block-quote/blockquote
|
351
|
+
*/
|
352
|
+
/**
|
353
|
+
* The block quote plugin.
|
354
|
+
*
|
355
|
+
* For more information about this feature check the {@glink api/block-quote package page}.
|
356
|
+
*
|
357
|
+
* This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
|
358
|
+
* and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
|
359
|
+
*
|
360
|
+
* @extends module:core/plugin~Plugin
|
361
|
+
*/
|
362
|
+
class BlockQuote extends Plugin {
|
363
|
+
/**
|
364
|
+
* @inheritDoc
|
365
|
+
*/
|
366
|
+
static get requires() {
|
367
|
+
return [BlockQuoteEditing, BlockQuoteUI];
|
368
|
+
}
|
369
|
+
/**
|
370
|
+
* @inheritDoc
|
371
|
+
*/
|
372
|
+
static get pluginName() {
|
373
|
+
return 'BlockQuote';
|
374
|
+
}
|
375
|
+
}
|
376
|
+
|
377
|
+
export { BlockQuote, BlockQuoteEditing, BlockQuoteUI };
|
378
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.js","../src/blockquotecommand.ts","../src/blockquoteediting.ts","../src/blockquoteui.ts","../src/blockquote.ts"],"names":[],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAChF,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,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,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,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;ACLA,CAAA,CAAA,CAAA;ADOA,CAAC,CAAC,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C;AACvD,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG","file":"index.js.map","sourcesContent":["import { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { Enter } from '@ckeditor/ckeditor5-enter/dist/index.js';\nimport { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';\nimport { first } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\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 block-quote/blockquotecommand\n */\n/**\n * The block quote command plugin.\n *\n * @extends module:core/command~Command\n */\nclass BlockQuoteCommand extends Command {\n /**\n * @inheritDoc\n */\n refresh() {\n this.value = this._getValue();\n this.isEnabled = this._checkEnabled();\n }\n /**\n * Executes the command. When the command {@link #value is on}, all top-most block quotes within\n * the selection will be removed. If it is off, all selected blocks will be wrapped with\n * a block quote.\n *\n * @fires execute\n * @param options Command options.\n * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,\n * otherwise the command will remove the block quote. If not set, the command will act basing on its current value.\n */\n execute(options = {}) {\n const model = this.editor.model;\n const schema = model.schema;\n const selection = model.document.selection;\n const blocks = Array.from(selection.getSelectedBlocks());\n const value = (options.forceValue === undefined) ? !this.value : options.forceValue;\n model.change(writer => {\n if (!value) {\n this._removeQuote(writer, blocks.filter(findQuote));\n }\n else {\n const blocksToQuote = blocks.filter(block => {\n // Already quoted blocks needs to be considered while quoting too\n // in order to reuse their <bQ> elements.\n return findQuote(block) || checkCanBeQuoted(schema, block);\n });\n this._applyQuote(writer, blocksToQuote);\n }\n });\n }\n /**\n * Checks the command's {@link #value}.\n */\n _getValue() {\n const selection = this.editor.model.document.selection;\n const firstBlock = first(selection.getSelectedBlocks());\n // In the current implementation, the block quote must be an immediate parent of a block element.\n return !!(firstBlock && findQuote(firstBlock));\n }\n /**\n * Checks whether the command can be enabled in the current context.\n *\n * @returns Whether the command should be enabled.\n */\n _checkEnabled() {\n if (this.value) {\n return true;\n }\n const selection = this.editor.model.document.selection;\n const schema = this.editor.model.schema;\n const firstBlock = first(selection.getSelectedBlocks());\n if (!firstBlock) {\n return false;\n }\n return checkCanBeQuoted(schema, firstBlock);\n }\n /**\n * Removes the quote from given blocks.\n *\n * If blocks which are supposed to be \"unquoted\" are in the middle of a quote,\n * start it or end it, then the quote will be split (if needed) and the blocks\n * will be moved out of it, so other quoted blocks remained quoted.\n */\n _removeQuote(writer, blocks) {\n // Unquote all groups of block. Iterate in the reverse order to not break following ranges.\n getRangesOfBlockGroups(writer, blocks).reverse().forEach(groupRange => {\n if (groupRange.start.isAtStart && groupRange.end.isAtEnd) {\n writer.unwrap(groupRange.start.parent);\n return;\n }\n // The group of blocks are at the beginning of an <bQ> so let's move them left (out of the <bQ>).\n if (groupRange.start.isAtStart) {\n const positionBefore = writer.createPositionBefore(groupRange.start.parent);\n writer.move(groupRange, positionBefore);\n return;\n }\n // The blocks are in the middle of an <bQ> so we need to split the <bQ> after the last block\n // so we move the items there.\n if (!groupRange.end.isAtEnd) {\n writer.split(groupRange.end);\n }\n // Now we are sure that groupRange.end.isAtEnd is true, so let's move the blocks right.\n const positionAfter = writer.createPositionAfter(groupRange.end.parent);\n writer.move(groupRange, positionAfter);\n });\n }\n /**\n * Applies the quote to given blocks.\n */\n _applyQuote(writer, blocks) {\n const quotesToMerge = [];\n // Quote all groups of block. Iterate in the reverse order to not break following ranges.\n getRangesOfBlockGroups(writer, blocks).reverse().forEach(groupRange => {\n let quote = findQuote(groupRange.start);\n if (!quote) {\n quote = writer.createElement('blockQuote');\n writer.wrap(groupRange, quote);\n }\n quotesToMerge.push(quote);\n });\n // Merge subsequent <bQ> elements. Reverse the order again because this time we want to go through\n // the <bQ> elements in the source order (due to how merge works – it moves the right element's content\n // to the first element and removes the right one. Since we may need to merge a couple of subsequent `<bQ>` elements\n // we want to keep the reference to the first (furthest left) one.\n quotesToMerge.reverse().reduce((currentQuote, nextQuote) => {\n if (currentQuote.nextSibling == nextQuote) {\n writer.merge(writer.createPositionAfter(currentQuote));\n return currentQuote;\n }\n return nextQuote;\n });\n }\n}\nfunction findQuote(elementOrPosition) {\n return elementOrPosition.parent.name == 'blockQuote' ? elementOrPosition.parent : null;\n}\n/**\n * Returns a minimal array of ranges containing groups of subsequent blocks.\n *\n * content: abcdefgh\n * blocks: [ a, b, d, f, g, h ]\n * output ranges: [ab]c[d]e[fgh]\n */\nfunction getRangesOfBlockGroups(writer, blocks) {\n let startPosition;\n let i = 0;\n const ranges = [];\n while (i < blocks.length) {\n const block = blocks[i];\n const nextBlock = blocks[i + 1];\n if (!startPosition) {\n startPosition = writer.createPositionBefore(block);\n }\n if (!nextBlock || block.nextSibling != nextBlock) {\n ranges.push(writer.createRange(startPosition, writer.createPositionAfter(block)));\n startPosition = null;\n }\n i++;\n }\n return ranges;\n}\n/**\n * Checks whether <bQ> can wrap the block.\n */\nfunction checkCanBeQuoted(schema, block) {\n // TMP will be replaced with schema.checkWrap().\n const isBQAllowed = schema.checkChild(block.parent, 'blockQuote');\n const isBlockAllowedInBQ = schema.checkChild(['$root', 'blockQuote'], block);\n return isBQAllowed && isBlockAllowedInBQ;\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 block-quote/blockquoteediting\n */\n/**\n * The block quote editing.\n *\n * Introduces the `'blockQuote'` command and the `'blockQuote'` model element.\n *\n * @extends module:core/plugin~Plugin\n */\nclass BlockQuoteEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'BlockQuoteEditing';\n }\n /**\n * @inheritDoc\n */\n static get requires() {\n return [Enter, Delete];\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const schema = editor.model.schema;\n editor.commands.add('blockQuote', new BlockQuoteCommand(editor));\n schema.register('blockQuote', {\n inheritAllFrom: '$container'\n });\n editor.conversion.elementToElement({ model: 'blockQuote', view: 'blockquote' });\n // Postfixer which cleans incorrect model states connected with block quotes.\n editor.model.document.registerPostFixer(writer => {\n const changes = editor.model.document.differ.getChanges();\n for (const entry of changes) {\n if (entry.type == 'insert') {\n const element = entry.position.nodeAfter;\n if (!element) {\n // We are inside a text node.\n continue;\n }\n if (element.is('element', 'blockQuote') && element.isEmpty) {\n // Added an empty blockQuote - remove it.\n writer.remove(element);\n return true;\n }\n else if (element.is('element', 'blockQuote') && !schema.checkChild(entry.position, element)) {\n // Added a blockQuote in incorrect place. Unwrap it so the content inside is not lost.\n writer.unwrap(element);\n return true;\n }\n else if (element.is('element')) {\n // Just added an element. Check that all children meet the scheme rules.\n const range = writer.createRangeIn(element);\n for (const child of range.getItems()) {\n if (child.is('element', 'blockQuote') &&\n !schema.checkChild(writer.createPositionBefore(child), child)) {\n writer.unwrap(child);\n return true;\n }\n }\n }\n }\n else if (entry.type == 'remove') {\n const parent = entry.position.parent;\n if (parent.is('element', 'blockQuote') && parent.isEmpty) {\n // Something got removed and now blockQuote is empty. Remove the blockQuote as well.\n writer.remove(parent);\n return true;\n }\n }\n }\n return false;\n });\n const viewDocument = this.editor.editing.view.document;\n const selection = editor.model.document.selection;\n const blockQuoteCommand = editor.commands.get('blockQuote');\n // Overwrite default Enter key behavior.\n // If Enter key is pressed with selection collapsed in empty block inside a quote, break the quote.\n this.listenTo(viewDocument, 'enter', (evt, data) => {\n if (!selection.isCollapsed || !blockQuoteCommand.value) {\n return;\n }\n const positionParent = selection.getLastPosition().parent;\n if (positionParent.isEmpty) {\n editor.execute('blockQuote');\n editor.editing.view.scrollToTheSelection();\n data.preventDefault();\n evt.stop();\n }\n }, { context: 'blockquote' });\n // Overwrite default Backspace key behavior.\n // If Backspace key is pressed with selection collapsed in first empty block inside a quote, break the quote.\n this.listenTo(viewDocument, 'delete', (evt, data) => {\n if (data.direction != 'backward' || !selection.isCollapsed || !blockQuoteCommand.value) {\n return;\n }\n const positionParent = selection.getLastPosition().parent;\n if (positionParent.isEmpty && !positionParent.previousSibling) {\n editor.execute('blockQuote');\n editor.editing.view.scrollToTheSelection();\n data.preventDefault();\n evt.stop();\n }\n }, { context: 'blockquote' });\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 block-quote/blockquoteui\n */\n/**\n * The block quote UI plugin.\n *\n * It introduces the `'blockQuote'` button.\n *\n * @extends module:core/plugin~Plugin\n */\nclass BlockQuoteUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'BlockQuoteUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const t = editor.t;\n editor.ui.componentFactory.add('blockQuote', locale => {\n const command = editor.commands.get('blockQuote');\n const buttonView = new ButtonView(locale);\n buttonView.set({\n label: t('Block quote'),\n icon: icons.quote,\n tooltip: true,\n isToggleable: true\n });\n // Bind button model to command.\n buttonView.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');\n // Execute command.\n this.listenTo(buttonView, 'execute', () => {\n editor.execute('blockQuote');\n editor.editing.view.focus();\n });\n return buttonView;\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 block-quote/blockquote\n */\n/**\n * The block quote plugin.\n *\n * For more information about this feature check the {@glink api/block-quote package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}\n * and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */\nclass BlockQuote extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [BlockQuoteEditing, BlockQuoteUI];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'BlockQuote';\n }\n}\n\nexport { BlockQuote, BlockQuoteEditing, BlockQuoteUI };\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 block-quote/blockquotecommand\n */\n\nimport { Command } from 'ckeditor5/src/core.js';\nimport { first } from 'ckeditor5/src/utils.js';\nimport type { DocumentFragment, Element, Position, Range, Schema, Writer } from 'ckeditor5/src/engine.js';\n\n/**\n * The block quote command plugin.\n *\n * @extends module:core/command~Command\n */\nexport default class BlockQuoteCommand extends Command {\n\t/**\n\t * Whether the selection starts in a block quote.\n\t *\n\t * @observable\n\t * @readonly\n\t */\n\tdeclare public value: boolean;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * Executes the command. When the command {@link #value is on}, all top-most block quotes within\n\t * the selection will be removed. If it is off, all selected blocks will be wrapped with\n\t * a block quote.\n\t *\n\t * @fires execute\n\t * @param options Command options.\n\t * @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,\n\t * otherwise the command will remove the block quote. If not set, the command will act basing on its current value.\n\t */\n\tpublic override execute( options: { forceValue?: boolean } = {} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst selection = model.document.selection;\n\n\t\tconst blocks = Array.from( selection.getSelectedBlocks() );\n\n\t\tconst value = ( options.forceValue === undefined ) ? !this.value : options.forceValue;\n\n\t\tmodel.change( writer => {\n\t\t\tif ( !value ) {\n\t\t\t\tthis._removeQuote( writer, blocks.filter( findQuote ) );\n\t\t\t} else {\n\t\t\t\tconst blocksToQuote = blocks.filter( block => {\n\t\t\t\t\t// Already quoted blocks needs to be considered while quoting too\n\t\t\t\t\t// in order to reuse their <bQ> elements.\n\t\t\t\t\treturn findQuote( block ) || checkCanBeQuoted( schema, block );\n\t\t\t\t} );\n\n\t\t\t\tthis._applyQuote( writer, blocksToQuote );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks the command's {@link #value}.\n\t */\n\tprivate _getValue(): boolean {\n\t\tconst selection = this.editor.model.document.selection;\n\n\t\tconst firstBlock = first( selection.getSelectedBlocks() );\n\n\t\t// In the current implementation, the block quote must be an immediate parent of a block element.\n\t\treturn !!( firstBlock && findQuote( firstBlock ) );\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @returns Whether the command should be enabled.\n\t */\n\tprivate _checkEnabled(): boolean {\n\t\tif ( this.value ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst selection = this.editor.model.document.selection;\n\t\tconst schema = this.editor.model.schema;\n\n\t\tconst firstBlock = first( selection.getSelectedBlocks() );\n\n\t\tif ( !firstBlock ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn checkCanBeQuoted( schema, firstBlock );\n\t}\n\n\t/**\n\t * Removes the quote from given blocks.\n\t *\n\t * If blocks which are supposed to be \"unquoted\" are in the middle of a quote,\n\t * start it or end it, then the quote will be split (if needed) and the blocks\n\t * will be moved out of it, so other quoted blocks remained quoted.\n\t */\n\tprivate _removeQuote( writer: Writer, blocks: Array<Element> ): void {\n\t\t// Unquote all groups of block. Iterate in the reverse order to not break following ranges.\n\t\tgetRangesOfBlockGroups( writer, blocks ).reverse().forEach( groupRange => {\n\t\t\tif ( groupRange.start.isAtStart && groupRange.end.isAtEnd ) {\n\t\t\t\twriter.unwrap( groupRange.start.parent as Element );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The group of blocks are at the beginning of an <bQ> so let's move them left (out of the <bQ>).\n\t\t\tif ( groupRange.start.isAtStart ) {\n\t\t\t\tconst positionBefore = writer.createPositionBefore( groupRange.start.parent as Element );\n\n\t\t\t\twriter.move( groupRange, positionBefore );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The blocks are in the middle of an <bQ> so we need to split the <bQ> after the last block\n\t\t\t// so we move the items there.\n\t\t\tif ( !groupRange.end.isAtEnd ) {\n\t\t\t\twriter.split( groupRange.end );\n\t\t\t}\n\n\t\t\t// Now we are sure that groupRange.end.isAtEnd is true, so let's move the blocks right.\n\n\t\t\tconst positionAfter = writer.createPositionAfter( groupRange.end.parent as Element );\n\n\t\t\twriter.move( groupRange, positionAfter );\n\t\t} );\n\t}\n\n\t/**\n\t * Applies the quote to given blocks.\n\t */\n\tprivate _applyQuote( writer: Writer, blocks: Array<Element> ): void {\n\t\tconst quotesToMerge: Array<Element | DocumentFragment> = [];\n\n\t\t// Quote all groups of block. Iterate in the reverse order to not break following ranges.\n\t\tgetRangesOfBlockGroups( writer, blocks ).reverse().forEach( groupRange => {\n\t\t\tlet quote = findQuote( groupRange.start );\n\n\t\t\tif ( !quote ) {\n\t\t\t\tquote = writer.createElement( 'blockQuote' );\n\n\t\t\t\twriter.wrap( groupRange, quote );\n\t\t\t}\n\n\t\t\tquotesToMerge.push( quote );\n\t\t} );\n\n\t\t// Merge subsequent <bQ> elements. Reverse the order again because this time we want to go through\n\t\t// the <bQ> elements in the source order (due to how merge works – it moves the right element's content\n\t\t// to the first element and removes the right one. Since we may need to merge a couple of subsequent `<bQ>` elements\n\t\t// we want to keep the reference to the first (furthest left) one.\n\t\tquotesToMerge.reverse().reduce( ( currentQuote, nextQuote ) => {\n\t\t\tif ( currentQuote.nextSibling == nextQuote ) {\n\t\t\t\twriter.merge( writer.createPositionAfter( currentQuote ) );\n\n\t\t\t\treturn currentQuote;\n\t\t\t}\n\n\t\t\treturn nextQuote;\n\t\t} );\n\t}\n}\n\nfunction findQuote( elementOrPosition: Element | Position ): Element | DocumentFragment | null {\n\treturn elementOrPosition.parent!.name == 'blockQuote' ? elementOrPosition.parent : null;\n}\n\n/**\n * Returns a minimal array of ranges containing groups of subsequent blocks.\n *\n * content: abcdefgh\n * blocks: [ a, b, d, f, g, h ]\n * output ranges: [ab]c[d]e[fgh]\n */\nfunction getRangesOfBlockGroups( writer: Writer, blocks: Array<Element> ): Array<Range> {\n\tlet startPosition;\n\tlet i = 0;\n\tconst ranges = [];\n\n\twhile ( i < blocks.length ) {\n\t\tconst block = blocks[ i ];\n\t\tconst nextBlock = blocks[ i + 1 ];\n\n\t\tif ( !startPosition ) {\n\t\t\tstartPosition = writer.createPositionBefore( block );\n\t\t}\n\n\t\tif ( !nextBlock || block.nextSibling != nextBlock ) {\n\t\t\tranges.push( writer.createRange( startPosition, writer.createPositionAfter( block ) ) );\n\t\t\tstartPosition = null;\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn ranges;\n}\n\n/**\n * Checks whether <bQ> can wrap the block.\n */\nfunction checkCanBeQuoted( schema: Schema, block: Element ): boolean {\n\t// TMP will be replaced with schema.checkWrap().\n\tconst isBQAllowed = schema.checkChild( block.parent as Element, 'blockQuote' );\n\tconst isBlockAllowedInBQ = schema.checkChild( [ '$root', 'blockQuote' ], block );\n\n\treturn isBQAllowed && isBlockAllowedInBQ;\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 block-quote/blockquoteediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Enter, type ViewDocumentEnterEvent } from 'ckeditor5/src/enter.js';\nimport { Delete, type ViewDocumentDeleteEvent } from 'ckeditor5/src/typing.js';\n\nimport BlockQuoteCommand from './blockquotecommand.js';\n\n/**\n * The block quote editing.\n *\n * Introduces the `'blockQuote'` command and the `'blockQuote'` model element.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class BlockQuoteEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BlockQuoteEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ Enter, Delete ] 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 schema = editor.model.schema;\n\n\t\teditor.commands.add( 'blockQuote', new BlockQuoteCommand( editor ) );\n\n\t\tschema.register( 'blockQuote', {\n\t\t\tinheritAllFrom: '$container'\n\t\t} );\n\n\t\teditor.conversion.elementToElement( { model: 'blockQuote', view: 'blockquote' } );\n\n\t\t// Postfixer which cleans incorrect model states connected with block quotes.\n\t\teditor.model.document.registerPostFixer( writer => {\n\t\t\tconst changes = editor.model.document.differ.getChanges();\n\n\t\t\tfor ( const entry of changes ) {\n\t\t\t\tif ( entry.type == 'insert' ) {\n\t\t\t\t\tconst element = entry.position.nodeAfter;\n\n\t\t\t\t\tif ( !element ) {\n\t\t\t\t\t\t// We are inside a text node.\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( element.is( 'element', 'blockQuote' ) && element.isEmpty ) {\n\t\t\t\t\t\t// Added an empty blockQuote - remove it.\n\t\t\t\t\t\twriter.remove( element );\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if ( element.is( 'element', 'blockQuote' ) && !schema.checkChild( entry.position, element ) ) {\n\t\t\t\t\t\t// Added a blockQuote in incorrect place. Unwrap it so the content inside is not lost.\n\t\t\t\t\t\twriter.unwrap( element );\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if ( element.is( 'element' ) ) {\n\t\t\t\t\t\t// Just added an element. Check that all children meet the scheme rules.\n\t\t\t\t\t\tconst range = writer.createRangeIn( element );\n\n\t\t\t\t\t\tfor ( const child of range.getItems() ) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tchild.is( 'element', 'blockQuote' ) &&\n\t\t\t\t\t\t\t\t!schema.checkChild( writer.createPositionBefore( child ), child )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\twriter.unwrap( child );\n\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ( entry.type == 'remove' ) {\n\t\t\t\t\tconst parent = entry.position.parent;\n\n\t\t\t\t\tif ( parent.is( 'element', 'blockQuote' ) && parent.isEmpty ) {\n\t\t\t\t\t\t// Something got removed and now blockQuote is empty. Remove the blockQuote as well.\n\t\t\t\t\t\twriter.remove( parent );\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} );\n\n\t\tconst viewDocument = this.editor.editing.view.document;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst blockQuoteCommand: BlockQuoteCommand = editor.commands.get( 'blockQuote' )!;\n\n\t\t// Overwrite default Enter key behavior.\n\t\t// If Enter key is pressed with selection collapsed in empty block inside a quote, break the quote.\n\t\tthis.listenTo<ViewDocumentEnterEvent>( viewDocument, 'enter', ( evt, data ) => {\n\t\t\tif ( !selection.isCollapsed || !blockQuoteCommand.value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst positionParent = selection.getLastPosition()!.parent;\n\n\t\t\tif ( positionParent.isEmpty ) {\n\t\t\t\teditor.execute( 'blockQuote' );\n\t\t\t\teditor.editing.view.scrollToTheSelection();\n\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: 'blockquote' } );\n\n\t\t// Overwrite default Backspace key behavior.\n\t\t// If Backspace key is pressed with selection collapsed in first empty block inside a quote, break the quote.\n\t\tthis.listenTo<ViewDocumentDeleteEvent>( viewDocument, 'delete', ( evt, data ) => {\n\t\t\tif ( data.direction != 'backward' || !selection.isCollapsed || !blockQuoteCommand!.value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst positionParent = selection.getLastPosition()!.parent;\n\n\t\t\tif ( positionParent.isEmpty && !positionParent.previousSibling ) {\n\t\t\t\teditor.execute( 'blockQuote' );\n\t\t\t\teditor.editing.view.scrollToTheSelection();\n\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: 'blockquote' } );\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 block-quote/blockquoteui\n */\n\nimport { Plugin, icons } from 'ckeditor5/src/core.js';\nimport { ButtonView } from 'ckeditor5/src/ui.js';\nimport type BlockQuoteCommand from './blockquotecommand.js';\n\nimport '../theme/blockquote.css';\n\n/**\n * The block quote UI plugin.\n *\n * It introduces the `'blockQuote'` button.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class BlockQuoteUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BlockQuoteUI' 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( 'blockQuote', locale => {\n\t\t\tconst command: BlockQuoteCommand = editor.commands.get( 'blockQuote' )!;\n\t\t\tconst buttonView = new ButtonView( locale );\n\n\t\t\tbuttonView.set( {\n\t\t\t\tlabel: t( 'Block quote' ),\n\t\t\t\ticon: icons.quote,\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\t// Bind button model to command.\n\t\t\tbuttonView.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );\n\n\t\t\t// Execute command.\n\t\t\tthis.listenTo( buttonView, 'execute', () => {\n\t\t\t\teditor.execute( 'blockQuote' );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn buttonView;\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 block-quote/blockquote\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\n\nimport BlockQuoteEditing from './blockquoteediting.js';\nimport BlockQuoteUI from './blockquoteui.js';\n\n/**\n * The block quote plugin.\n *\n * For more information about this feature check the {@glink api/block-quote package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}\n * and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class BlockQuote extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ BlockQuoteEditing, BlockQuoteUI ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'BlockQuote' 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 { BlockQuote, BlockQuoteCommand, BlockQuoteEditing, BlockQuoteUI } from './index.js';
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
7
|
+
interface PluginsMap {
|
8
|
+
[BlockQuote.pluginName]: BlockQuote;
|
9
|
+
[BlockQuoteEditing.pluginName]: BlockQuoteEditing;
|
10
|
+
[BlockQuoteUI.pluginName]: BlockQuoteUI;
|
11
|
+
}
|
12
|
+
interface CommandsMap {
|
13
|
+
blockQuote: BlockQuoteCommand;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,30 @@
|
|
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 block-quote/blockquote
|
7
|
+
*/
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import BlockQuoteEditing from './blockquoteediting.js';
|
10
|
+
import BlockQuoteUI from './blockquoteui.js';
|
11
|
+
/**
|
12
|
+
* The block quote plugin.
|
13
|
+
*
|
14
|
+
* For more information about this feature check the {@glink api/block-quote package page}.
|
15
|
+
*
|
16
|
+
* This is a "glue" plugin which loads the {@link module:block-quote/blockquoteediting~BlockQuoteEditing block quote editing feature}
|
17
|
+
* and {@link module:block-quote/blockquoteui~BlockQuoteUI block quote UI feature}.
|
18
|
+
*
|
19
|
+
* @extends module:core/plugin~Plugin
|
20
|
+
*/
|
21
|
+
export default class BlockQuote extends Plugin {
|
22
|
+
/**
|
23
|
+
* @inheritDoc
|
24
|
+
*/
|
25
|
+
static get requires(): readonly [typeof BlockQuoteEditing, typeof BlockQuoteUI];
|
26
|
+
/**
|
27
|
+
* @inheritDoc
|
28
|
+
*/
|
29
|
+
static get pluginName(): "BlockQuote";
|
30
|
+
}
|
@@ -0,0 +1,61 @@
|
|
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 block-quote/blockquotecommand
|
7
|
+
*/
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
9
|
+
/**
|
10
|
+
* The block quote command plugin.
|
11
|
+
*
|
12
|
+
* @extends module:core/command~Command
|
13
|
+
*/
|
14
|
+
export default class BlockQuoteCommand extends Command {
|
15
|
+
/**
|
16
|
+
* Whether the selection starts in a block quote.
|
17
|
+
*
|
18
|
+
* @observable
|
19
|
+
* @readonly
|
20
|
+
*/
|
21
|
+
value: boolean;
|
22
|
+
/**
|
23
|
+
* @inheritDoc
|
24
|
+
*/
|
25
|
+
refresh(): void;
|
26
|
+
/**
|
27
|
+
* Executes the command. When the command {@link #value is on}, all top-most block quotes within
|
28
|
+
* the selection will be removed. If it is off, all selected blocks will be wrapped with
|
29
|
+
* a block quote.
|
30
|
+
*
|
31
|
+
* @fires execute
|
32
|
+
* @param options Command options.
|
33
|
+
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a block quote,
|
34
|
+
* otherwise the command will remove the block quote. If not set, the command will act basing on its current value.
|
35
|
+
*/
|
36
|
+
execute(options?: {
|
37
|
+
forceValue?: boolean;
|
38
|
+
}): void;
|
39
|
+
/**
|
40
|
+
* Checks the command's {@link #value}.
|
41
|
+
*/
|
42
|
+
private _getValue;
|
43
|
+
/**
|
44
|
+
* Checks whether the command can be enabled in the current context.
|
45
|
+
*
|
46
|
+
* @returns Whether the command should be enabled.
|
47
|
+
*/
|
48
|
+
private _checkEnabled;
|
49
|
+
/**
|
50
|
+
* Removes the quote from given blocks.
|
51
|
+
*
|
52
|
+
* If blocks which are supposed to be "unquoted" are in the middle of a quote,
|
53
|
+
* start it or end it, then the quote will be split (if needed) and the blocks
|
54
|
+
* will be moved out of it, so other quoted blocks remained quoted.
|
55
|
+
*/
|
56
|
+
private _removeQuote;
|
57
|
+
/**
|
58
|
+
* Applies the quote to given blocks.
|
59
|
+
*/
|
60
|
+
private _applyQuote;
|
61
|
+
}
|
@@ -0,0 +1,31 @@
|
|
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 block-quote/blockquoteediting
|
7
|
+
*/
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import { Enter } from 'ckeditor5/src/enter.js';
|
10
|
+
import { Delete } from 'ckeditor5/src/typing.js';
|
11
|
+
/**
|
12
|
+
* The block quote editing.
|
13
|
+
*
|
14
|
+
* Introduces the `'blockQuote'` command and the `'blockQuote'` model element.
|
15
|
+
*
|
16
|
+
* @extends module:core/plugin~Plugin
|
17
|
+
*/
|
18
|
+
export default class BlockQuoteEditing extends Plugin {
|
19
|
+
/**
|
20
|
+
* @inheritDoc
|
21
|
+
*/
|
22
|
+
static get pluginName(): "BlockQuoteEditing";
|
23
|
+
/**
|
24
|
+
* @inheritDoc
|
25
|
+
*/
|
26
|
+
static get requires(): readonly [typeof Enter, typeof Delete];
|
27
|
+
/**
|
28
|
+
* @inheritDoc
|
29
|
+
*/
|
30
|
+
init(): void;
|
31
|
+
}
|
@@ -0,0 +1,26 @@
|
|
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 block-quote/blockquoteui
|
7
|
+
*/
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
9
|
+
import '../theme/blockquote.css';
|
10
|
+
/**
|
11
|
+
* The block quote UI plugin.
|
12
|
+
*
|
13
|
+
* It introduces the `'blockQuote'` button.
|
14
|
+
*
|
15
|
+
* @extends module:core/plugin~Plugin
|
16
|
+
*/
|
17
|
+
export default class BlockQuoteUI extends Plugin {
|
18
|
+
/**
|
19
|
+
* @inheritDoc
|
20
|
+
*/
|
21
|
+
static get pluginName(): "BlockQuoteUI";
|
22
|
+
/**
|
23
|
+
* @inheritDoc
|
24
|
+
*/
|
25
|
+
init(): void;
|
26
|
+
}
|
@@ -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 block-quote
|
7
|
+
*/
|
8
|
+
export { default as BlockQuote } from './blockquote.js';
|
9
|
+
export { default as BlockQuoteEditing } from './blockquoteediting.js';
|
10
|
+
export { default as BlockQuoteUI } from './blockquoteui.js';
|
11
|
+
export type { default as BlockQuoteCommand } from './blockquotecommand.js';
|
12
|
+
import './augmentation.js';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-block-quote",
|
3
|
-
"version": "41.
|
3
|
+
"version": "41.3.0-alpha.0",
|
4
4
|
"description": "Block quote 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-block-quote"
|
26
26
|
},
|
27
27
|
"files": [
|
28
|
+
"dist",
|
28
29
|
"lang",
|
29
30
|
"src/**/*.js",
|
30
31
|
"src/**/*.d.ts",
|