8
0

typing.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 typing/typing
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. import Input from './input';
  10. import Delete from './delete';
  11. /**
  12. * The typing feature. It handles typing.
  13. *
  14. * This is a "glue" plugin which loads the {@link module:typing/input~Input} and {@link module:typing/delete~Delete}
  15. * plugins.
  16. *
  17. * @extends module:core/plugin~Plugin
  18. */
  19. export default class Typing extends Plugin {
  20. static get requires() {
  21. return [ Input, Delete ];
  22. }
  23. /**
  24. * @inheritDoc
  25. */
  26. static get pluginName() {
  27. return 'Typing';
  28. }
  29. }
  30. /**
  31. * The configuration of the typing features. Used by the features from the `@ckeditor/ckeditor5-typing` package.
  32. *
  33. * Read more in {@link module:typing/typing~TypingConfig}.
  34. *
  35. * @member {module:typing/typing~TypingConfig} module:core/editor/editorconfig~EditorConfig#typing
  36. */
  37. /**
  38. * The configuration of the typing features. Used by the typing features in `@ckeditor/ckeditor5-typing` package.
  39. *
  40. * ClassicEditor
  41. * .create( editorElement, {
  42. * typing: ... // Typing feature options.
  43. * } )
  44. * .then( ... )
  45. * .catch( ... );
  46. *
  47. * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
  48. *
  49. * @interface TypingConfig
  50. */
  51. /**
  52. * The granularity of undo/redo for typing and deleting. The value `20` means (more or less) that a new undo step
  53. * is created every 20 characters are inserted or deleted.
  54. *
  55. * @member {Number} [module:typing/typing~TypingConfig#undoStep=20]
  56. */