25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

29 satır
771 B

  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. *
  9. * @emails oncall+draft_js
  10. */
  11. 'use strict';
  12. var EditorState = require("./EditorState");
  13. /**
  14. * The user has begun using an IME input system. Switching to `composite` mode
  15. * allows handling composition input and disables other edit behavior.
  16. */
  17. function editOnCompositionStart(editor, e) {
  18. editor.setMode('composite');
  19. editor.update(EditorState.set(editor._latestEditorState, {
  20. inCompositionMode: true
  21. })); // Allow composition handler to interpret the compositionstart event
  22. editor._onCompositionStart(e);
  23. }
  24. module.exports = editOnCompositionStart;