Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

61 строка
1.4 KiB

  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @format
  8. * @flow strict
  9. * @emails oncall+draft_js
  10. */
  11. 'use strict';
  12. /**
  13. * A set of editor commands that may be invoked by keyboard commands or UI
  14. * controls. These commands should map to operations that modify content or
  15. * selection state and update the editor state accordingly.
  16. */
  17. export type DraftEditorCommand =
  18. /**
  19. * Self-explanatory.
  20. */
  21. 'undo' | 'redo'
  22. /**
  23. * Perform a forward deletion.
  24. */
  25. | 'delete'
  26. /**
  27. * Perform a forward deletion to the next word boundary after the selection.
  28. */
  29. | 'delete-word'
  30. /**
  31. * Perform a backward deletion.
  32. */
  33. | 'backspace'
  34. /**
  35. * Perform a backward deletion to the previous word boundary before the
  36. * selection.
  37. */
  38. | 'backspace-word'
  39. /**
  40. * Perform a backward deletion to the beginning of the current line.
  41. */
  42. | 'backspace-to-start-of-line'
  43. /**
  44. * Toggle styles. Commands may be intepreted to modify inline text ranges
  45. * or block types.
  46. */
  47. | 'bold' | 'italic' | 'underline' | 'code'
  48. /**
  49. * Split a block in two.
  50. */
  51. | 'split-block'
  52. /**
  53. * Self-explanatory.
  54. */
  55. | 'transpose-characters' | 'move-selection-to-start-of-block' | 'move-selection-to-end-of-block'
  56. /**
  57. * Commands to support the "secondary" clipboard provided by certain
  58. * browsers and operating systems.
  59. */
  60. | 'secondary-cut' | 'secondary-paste';