1 | import { Plugin } from '@ckeditor/ckeditor5-core';
|
2 | import { Widget } from '@ckeditor/ckeditor5-widget';
|
3 | import TableClipboard from './tableclipboard';
|
4 | import TableEditing from './tableediting';
|
5 | import TableKeyboard from './tablekeyboard';
|
6 | import TableSelection from './tableselection';
|
7 | import TableUI from './tableui';
|
8 | import TableMouse from './tablemouse';
|
9 |
|
10 | export default class Table extends Plugin {
|
11 | static readonly requires: [
|
12 | typeof TableEditing,
|
13 | typeof TableUI,
|
14 | typeof TableSelection,
|
15 | typeof TableMouse,
|
16 | typeof TableKeyboard,
|
17 | typeof TableClipboard,
|
18 | typeof Widget,
|
19 | ];
|
20 | static readonly pluginName: 'Table';
|
21 | }
|
22 |
|
23 | export interface TableConfig {
|
24 | contentToolbar?: string[] | undefined;
|
25 | tableCellProperties?:
|
26 | | {
|
27 | borderColors?: TableColorConfig[] | undefined;
|
28 | backgroundColors: TableColorConfig[];
|
29 | }
|
30 | | undefined;
|
31 | tableProperties?:
|
32 | | {
|
33 | borderColors?: TableColorConfig[] | undefined;
|
34 | backgroundColors: TableColorConfig[];
|
35 | }
|
36 | | undefined;
|
37 | tableToolbar?: string[] | undefined;
|
38 | }
|
39 |
|
40 | export type TableColorConfig =
|
41 | | string
|
42 | | {
|
43 | color: string;
|
44 | label: string;
|
45 | hasBorder?: boolean | undefined;
|
46 | };
|
47 |
|
48 | declare module '@ckeditor/ckeditor5-core/src/plugincollection' {
|
49 | interface Plugins {
|
50 | Table: Table;
|
51 | }
|
52 | }
|