table/utils/table-properties
@ckeditor/ckeditor5-table/src/utils/table-properties
Filtering
Interfaces
-
NormalizedDefaultProperties
module:table/utils/table-properties~NormalizedDefaultProperties
Type Definitions
-
NormalizeTableDefaultPropertiesOptions
module:table/utils/table-properties~NormalizeTableDefaultPropertiesOptions
Functions
-
addDefaultUnitToNumericValue( value, defaultUnit ) → string | number | undefined
module:table/utils/table-properties~addDefaultUnitToNumericValue
Adds a unit to a value if the value is a number or a string representing a number.
Note: It does nothing to non-numeric values.
getSingleValue( 25, 'px' ); // '25px' getSingleValue( 25, 'em' ); // '25em' getSingleValue( '25em', 'px' ); // '25em' getSingleValue( 'foo', 'px' ); // 'foo'
Parameters
value : undefined | string | number
defaultUnit : string
A default unit added to a numeric value.
Returns
string | number | undefined
-
getNormalizedDefaultCellProperties( config, [ options ] ) → NormalizedDefaultProperties
module:table/utils/table-properties~getNormalizedDefaultCellProperties
Returns the normalized default cell properties.
Parameters
config : undefined | Partial<NormalizedDefaultProperties>
The configuration to normalize.
[ options ] : NormalizeTableDefaultPropertiesOptions
Options used to determine which properties should be added.
Returns
-
getNormalizedDefaultProperties( config, options ) → NormalizedDefaultProperties
module:table/utils/table-properties~getNormalizedDefaultProperties
Returns the normalized configuration.
Parameters
config : undefined | Partial<NormalizedDefaultProperties>
The configuration to normalize.
options : NormalizeTableDefaultPropertiesOptions
Options used to determine which properties should be added.
Defaults to
{}
Returns
-
getNormalizedDefaultTableProperties( config, [ options ] ) → NormalizedDefaultProperties
module:table/utils/table-properties~getNormalizedDefaultTableProperties
Returns the normalized default table properties.
Parameters
config : undefined | Partial<NormalizedDefaultProperties>
The configuration to normalize.
[ options ] : NormalizeTableDefaultPropertiesOptions
Options used to determine which properties should be added.
Returns
-
getSingleValue( objectOrString ) → string | undefined
module:table/utils/table-properties~getSingleValue
Returns a string if all four values of box sides are equal.
If a string is passed, it is treated as a single value (pass-through).
// Returns 'foo': getSingleValue( { top: 'foo', right: 'foo', bottom: 'foo', left: 'foo' } ); getSingleValue( 'foo' ); // Returns undefined: getSingleValue( { top: 'foo', right: 'foo', bottom: 'bar', left: 'foo' } ); getSingleValue( { top: 'foo', right: 'foo' } );
Parameters
objectOrString : undefined | string | BoxSides
Returns
string | undefined
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.