8
0

tablealignmentcommand.js 1.0 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/tableproperties/commands/tablealignmentcommand
  7. */
  8. import TablePropertyCommand from './tablepropertycommand';
  9. /**
  10. * The table alignment command.
  11. *
  12. * The command is registered by the {@link module:table/tableproperties/tablepropertiesediting~TablePropertiesEditing} as
  13. * `'tableAlignment'` editor command.
  14. *
  15. * To change the alignment of the selected table, execute the command:
  16. *
  17. * editor.execute( 'tableAlignment', {
  18. * value: 'right'
  19. * } );
  20. *
  21. * @extends module:table/tableproperties/commands/tablepropertycommand
  22. */
  23. export default class TableAlignmentCommand extends TablePropertyCommand {
  24. /**
  25. * Creates a new `TableAlignmentCommand` instance.
  26. *
  27. * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
  28. */
  29. constructor( editor ) {
  30. super( editor, 'alignment' );
  31. }
  32. }