Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ editor.plugins.get('AlignmentEditing');
editor.plugins.get('AlignmentUI');

// $ExpectType AlignmentCommand | undefined
editor.commands.get('AlignmentCommand');
editor.commands.get('alignment');
6 changes: 0 additions & 6 deletions types/ckeditor__ckeditor5-alignment/src/alignmentcommand.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,3 @@ export default class AlignmentCommand extends Command {
*/
execute(options?: { value?: AlignmentCommand['value'] }): void;
}

declare module '@ckeditor/ckeditor5-core/src/commandcollection' {
interface Commands {
AlignmentCommand: AlignmentCommand;
}
}
9 changes: 9 additions & 0 deletions types/ckeditor__ckeditor5-alignment/src/alignmentediting.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Plugin } from '@ckeditor/ckeditor5-core';
import AlignmentCommand from './alignmentcommand';

/**
* The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds
* the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.
*/
export default class AlignmentEditing extends Plugin {
static readonly pluginName: 'AlignmentEditing';

init(): void;
}

Expand All @@ -26,3 +29,9 @@ declare module '@ckeditor/ckeditor5-core/src/plugincollection' {
AlignmentEditing: AlignmentEditing;
}
}

declare module '@ckeditor/ckeditor5-core/src/commandcollection' {
interface Commands {
alignment: AlignmentCommand;
}
}
18 changes: 17 additions & 1 deletion types/ckeditor__ckeditor5-alignment/src/alignmentui.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Plugin } from '@ckeditor/ckeditor5-core';
import { EditorWithUI } from '@ckeditor/ckeditor5-core/src/editor/editorwithui';

/**
* The default alignment UI plugin.
Expand All @@ -7,13 +8,28 @@ import { Plugin } from '@ckeditor/ckeditor5-core';
* and the `'alignment'` dropdown.
*/
export default class AlignmentUI extends Plugin {
static readonly pluginName: 'AlignmentUI';

/**
* Returns the localized option titles provided by the plugin.
*
* The following localized titles corresponding with
* {@link module:alignment/alignment~AlignmentConfig#options} are available:
*
* * `'left'`,
* * `'right'`,
* * `'center'`,
* * `'justify'`.
*/
readonly localizedOptionTitles: {
left: string;
right: string;
center: string;
justify: string;
};
static readonly pluginName: 'AlignmentUI';

readonly editor: EditorWithUI;

init(): void;
}

Expand Down