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

3 лет назад
12345678910111213141516171819202122232425
  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 DraftEntityInstance = require("./DraftEntityInstance");
  13. var addEntityToContentState = require("./addEntityToContentState");
  14. function createEntityInContentState(contentState, type, mutability, data) {
  15. return addEntityToContentState(contentState, new DraftEntityInstance({
  16. type: type,
  17. mutability: mutability,
  18. data: data || {}
  19. }));
  20. }
  21. module.exports = createEntityInContentState;