| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- /**
- * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
- /**
- * @module table/tableproperties
- */
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
- import TablePropertiesEditing from './tableproperties/tablepropertiesediting';
- import TablePropertiesUI from './tableproperties/tablepropertiesui';
- /**
- * The table properties feature. Enables support for setting properties of tables (size, border, background, etc.).
- *
- * Read more in the {@glink features/table#table-and-cell-styling-tools Table and cell styling tools} section.
- * See also the {@link module:table/tablecellproperties~TableCellProperties} plugin.
- *
- * This is a "glue" plugin that loads the
- * {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing table properties editing feature} and
- * the {@link module:table/tableproperties/tablepropertiesui~TablePropertiesUI table properties UI feature}.
- *
- * @extends module:core/plugin~Plugin
- */
- export default class TableProperties extends Plugin {
- /**
- * @inheritDoc
- */
- static get pluginName() {
- return 'TableProperties';
- }
- /**
- * @inheritDoc
- */
- static get requires() {
- return [ TablePropertiesEditing, TablePropertiesUI ];
- }
- }
- /**
- * The configuration of the table properties user interface (balloon). It allows to define:
- *
- * * The color palette for the table border color style field (`tableProperties.borderColors`),
- * * The color palette for the table background style field (`tableProperties.backgroundColors`).
- *
- * const tableConfig = {
- * tableProperties: {
- * borderColors: [
- * {
- * color: 'hsl(0, 0%, 90%)',
- * label: 'Light grey'
- * },
- * // ...
- * ],
- * backgroundColors: [
- * {
- * color: 'hsl(120, 75%, 60%)',
- * label: 'Green'
- * },
- * // ...
- * ]
- * }
- * };
- *
- * **Note**: The configurations do not impact the data loaded into the editor,
- * i.e. they do not limit or filter the colors in the data. They are used only in the user interface
- * allowing users to pick colors in a more convenient way.
- *
- * The default color palettes for the table background and the table border are the same
- * ({@link module:table/ui/utils~defaultColors check out their content}).
- *
- * Both color palette configurations must follow the
- * {@link module:table/table~TableColorConfig table color configuration format}.
- *
- * Read more about configuring the table feature in {@link module:table/table~TableConfig}.
- *
- * @member {Object} module:table/table~TableConfig#tableProperties
- */
|