Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

25 righe
647 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 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;