1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { View, ButtonView, type ViewCollection } from 'ckeditor5/src/ui';
|
9 | import { KeystrokeHandler, FocusTracker, type Locale } from 'ckeditor5/src/utils';
|
10 | import './../../theme/inserttable.css';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export default class InsertTableView extends View {
|
17 | |
18 |
|
19 |
|
20 | readonly items: ViewCollection<ButtonView>;
|
21 | |
22 |
|
23 |
|
24 | readonly keystrokes: KeystrokeHandler;
|
25 | |
26 |
|
27 |
|
28 | readonly focusTracker: FocusTracker;
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 | rows: number;
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 | columns: number;
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | label: string;
|
47 | |
48 |
|
49 |
|
50 | constructor(locale: Locale);
|
51 | render(): void;
|
52 | /**
|
53 | * @inheritDoc
|
54 | */
|
55 | focus(): void;
|
56 | /**
|
57 | * @inheritDoc
|
58 | */
|
59 | focusLast(): void;
|
60 | /**
|
61 | * Highlights grid boxes depending on rows and columns selected.
|
62 | */
|
63 | private _highlightGridBoxes;
|
64 | /**
|
65 | * Creates a new Button for the grid.
|
66 | *
|
67 | * @param locale The locale instance.
|
68 | * @param row Row number.
|
69 | * @param column Column number.
|
70 | * @param label The grid button label.
|
71 | */
|
72 | private _createGridButton;
|
73 | /**
|
74 | * @returns A view collection containing boxes to be placed in a table grid.
|
75 | */
|
76 | private _createGridCollection;
|
77 | }
|