tablecellhorizontalalignmentcommand.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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/tablecellhorizontalalignmentcommand
  7. */
  8. import TableCellPropertyCommand from './tablecellpropertycommand';
  9. /**
  10. * The table cell horizontal alignment command.
  11. *
  12. * The command is registered by {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
  13. * `'tableCellHorizontalAlignment'` editor command.
  14. *
  15. * To change cell horizontal alignment of the selected cell, execute the command:
  16. *
  17. * editor.execute( 'tableCellHorizontalAlignment', {
  18. * value: 'right'
  19. * } );
  20. *
  21. * @extends module:table/tablecellproperties/commands/tablecellpropertycommand
  22. */
  23. export default class TableCellHorizontalAlignmentCommand extends TableCellPropertyCommand {
  24. /**
  25. * Creates a new `TableCellHorizontalAlignmentCommand` instance.
  26. *
  27. * @param {module:core/editor/editor~Editor} editor Editor on which this command will be used.
  28. */
  29. constructor( editor ) {
  30. super( editor, 'horizontalAlignment' );
  31. }
  32. }