@ckeditor/ckeditor5-find-and-replace 48.2.0-alpha.7 → 48.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.
@@ -1,35 +1,35 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module find-and-replace/replaceallcommand
7
- */
8
- import { Collection } from '@ckeditor/ckeditor5-utils';
9
- import type { FindResultType } from './findandreplace.js';
10
- import { FindReplaceCommandBase } from './replacecommandbase.js';
6
+ * @module find-and-replace/replaceallcommand
7
+ */
8
+ import { Collection } from "@ckeditor/ckeditor5-utils";
9
+ import type { FindResultType } from "./findandreplace.js";
10
+ import { FindReplaceCommandBase } from "./replacecommandbase.js";
11
11
  /**
12
- * The replace all command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
13
- */
12
+ * The replace all command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
13
+ */
14
14
  export declare class ReplaceAllCommand extends FindReplaceCommandBase {
15
- /**
16
- * Replaces all the occurrences of `textToReplace` with a given `newText` string.
17
- *
18
- * ```ts
19
- * replaceAllCommand.execute( 'replaceAll', 'new text replacement', 'text to replace' );
20
- * ```
21
- *
22
- * Alternatively you can call it from editor instance:
23
- *
24
- * ```ts
25
- * editor.execute( 'replaceAll', 'new text', 'old text' );
26
- * ```
27
- *
28
- * @param newText Text that will be inserted to the editor for each match.
29
- * @param textToReplace Text to be replaced or a collection of matches
30
- * as returned by the find command.
31
- *
32
- * @fires module:core/command~Command#event:execute
33
- */
34
- execute(newText: string, textToReplace: string | Collection<FindResultType>): void;
15
+ /**
16
+ * Replaces all the occurrences of `textToReplace` with a given `newText` string.
17
+ *
18
+ * ```ts
19
+ * replaceAllCommand.execute( 'replaceAll', 'new text replacement', 'text to replace' );
20
+ * ```
21
+ *
22
+ * Alternatively you can call it from editor instance:
23
+ *
24
+ * ```ts
25
+ * editor.execute( 'replaceAll', 'new text', 'old text' );
26
+ * ```
27
+ *
28
+ * @param newText Text that will be inserted to the editor for each match.
29
+ * @param textToReplace Text to be replaced or a collection of matches
30
+ * as returned by the find command.
31
+ *
32
+ * @fires module:core/command~Command#event:execute
33
+ */
34
+ override execute(newText: string, textToReplace: string | Collection<FindResultType>): void;
35
35
  }
@@ -1,22 +1,22 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module find-and-replace/replacecommand
6
+ * @module find-and-replace/replacecommand
7
7
  */
8
- import type { FindResultType } from './findandreplace.js';
9
- import { FindReplaceCommandBase } from './replacecommandbase.js';
8
+ import type { FindResultType } from "./findandreplace.js";
9
+ import { FindReplaceCommandBase } from "./replacecommandbase.js";
10
10
  /**
11
- * The replace command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
12
- */
11
+ * The replace command. It is used by the {@link module:find-and-replace/findandreplace~FindAndReplace find and replace feature}.
12
+ */
13
13
  export declare class ReplaceCommand extends FindReplaceCommandBase {
14
- /**
15
- * Replace a given find result by a string or a callback.
16
- *
17
- * @param result A single result from the find command.
18
- *
19
- * @fires execute
20
- */
21
- execute(replacementText: string, result: FindResultType): void;
14
+ /**
15
+ * Replace a given find result by a string or a callback.
16
+ *
17
+ * @param result A single result from the find command.
18
+ *
19
+ * @fires execute
20
+ */
21
+ override execute(replacementText: string, result: FindResultType): void;
22
22
  }
@@ -1,31 +1,31 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module find-and-replace/replacecommandbase
6
+ * @module find-and-replace/replacecommandbase
7
7
  */
8
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
9
- import type { FindResultType } from './findandreplace.js';
10
- import { type FindAndReplaceState } from './findandreplacestate.js';
8
+ import { Command, type Editor } from "@ckeditor/ckeditor5-core";
9
+ import type { FindResultType } from "./findandreplace.js";
10
+ import { type FindAndReplaceState } from "./findandreplacestate.js";
11
11
  export declare abstract class FindReplaceCommandBase extends Command {
12
- /**
13
- * The find and replace state object used for command operations.
14
- */
15
- protected _state: FindAndReplaceState;
16
- /**
17
- * Creates a new `ReplaceCommand` instance.
18
- *
19
- * @param editor Editor on which this command will be used.
20
- * @param state An object to hold plugin state.
21
- */
22
- constructor(editor: Editor, state: FindAndReplaceState);
23
- abstract execute(...args: Array<unknown>): void;
24
- /**
25
- * Common logic for both `replace` commands.
26
- * Replace a given find result by a string or a callback.
27
- *
28
- * @param result A single result from the find command.
29
- */
30
- protected _replace(replacementText: string, result: FindResultType): void;
12
+ /**
13
+ * The find and replace state object used for command operations.
14
+ */
15
+ protected _state: FindAndReplaceState;
16
+ /**
17
+ * Creates a new `ReplaceCommand` instance.
18
+ *
19
+ * @param editor Editor on which this command will be used.
20
+ * @param state An object to hold plugin state.
21
+ */
22
+ constructor(editor: Editor, state: FindAndReplaceState);
23
+ abstract override execute(...args: Array<unknown>): void;
24
+ /**
25
+ * Common logic for both `replace` commands.
26
+ * Replace a given find result by a string or a callback.
27
+ *
28
+ * @param result A single result from the find command.
29
+ */
30
+ protected _replace(replacementText: string, result: FindResultType): void;
31
31
  }