Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

addEntityToContentState.js 516 B

3 lat temu
12345678910111213141516171819
  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 addEntityToEntityMap = require("./addEntityToEntityMap");
  13. function addEntityToContentState(contentState, instance) {
  14. return contentState.set('entityMap', addEntityToEntityMap(contentState.getEntityMap(), instance));
  15. }
  16. module.exports = addEntityToContentState;