8
0

tablecellverticalalignmentcommand.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /**
  6. * @module table/tablecellproperties/commands/tablecellverticalalignmentcommand
  7. */
  8. import TableCellPropertyCommand from './tablecellpropertycommand';
  9. /**
  10. * The table cell vertical alignment command.
  11. *
  12. * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
  13. * `'tableCellVerticalAlignment'` editor command.
  14. *
  15. * To change the vertical text alignment of selected cells, execute the command:
  16. *
  17. * editor.execute( 'tableCellVerticalAlignment', {
  18. * value: 'top'
  19. * } );
  20. *
  21. * The following values are allowed corresponding to
  22. * [the `vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align):
  23. *
  24. * * `'top'`
  25. * * `'bottom'`
  26. * * `'middle'`
  27. *
  28. * @extends module:table/tablecellproperties/commands/tablecellpropertycommand
  29. */
  30. export default class TableCellVerticalAlignmentCommand extends TableCellPropertyCommand {
  31. /**
  32. * Creates a new `TableCellVerticalAlignmentCommand` instance.
  33. *
  34. * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
  35. */
  36. constructor( editor ) {
  37. super( editor, 'verticalAlignment' );
  38. }
  39. }