removeformatediting.js 847 B

12345678910111213141516171819202122232425262728293031323334353637
  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 remove-format/removeformatediting
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. import RemoveFormatCommand from './removeformatcommand';
  10. /**
  11. * The remove format editing plugin.
  12. *
  13. * It registers the {@link module:remove-format/removeformatcommand~RemoveFormatCommand removeFormat} command.
  14. *
  15. * @extends module:core/plugin~Plugin
  16. */
  17. export default class RemoveFormatEditing extends Plugin {
  18. /**
  19. * @inheritDoc
  20. */
  21. static get pluginName() {
  22. return 'RemoveFormatEditing';
  23. }
  24. /**
  25. * @inheritDoc
  26. */
  27. init() {
  28. const editor = this.editor;
  29. editor.commands.add( 'removeFormat', new RemoveFormatCommand( editor ) );
  30. }
  31. }