MCPcopy Create free account
hub / github.com/HubSpot/draft-convert / getEntityFromContentState

Function getEntityFromContentState

test/spec/convertFromHTML-test.js:13–20  ·  view source on GitHub ↗
(contentState, entityKey)

Source from the content-addressed store, hash-verified

11};
12
13const getEntityFromContentState = (contentState, entityKey) => {
14 // compatibility shim for draft-js@0.10 entity changes
15 if (contentState.getEntity) {
16 return contentState.getEntity(entityKey);
17 }
18
19 return Entity.get(entityKey);
20};
21
22describe('convertFromHTML', () => {
23 const toContentState = (html, options) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…