mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Adds definition of ContentState.getEntityMap() (#31706)
This commit is contained in:
committed by
Sheetal Nandi
parent
71211f88c4
commit
e338aaeaa4
@@ -315,6 +315,7 @@ ReactDOM.render(
|
||||
|
||||
const editorState = EditorState.createEmpty();
|
||||
const contentState = editorState.getCurrentContent();
|
||||
const entityMap = contentState.getEntityMap();
|
||||
const rawContentState: RawDraftContentState = convertToRaw(contentState);
|
||||
|
||||
rawContentState.blocks.forEach((block: RawDraftContentBlock) => {
|
||||
|
||||
Vendored
+2
@@ -9,6 +9,7 @@
|
||||
// Santiago Vilar <https://github.com/smvilar>
|
||||
// Ulf Schwekendiek <https://github.com/sulf>
|
||||
// Pablo Varela <https://github.com/pablopunk>
|
||||
// Claudio Procida <https://github.com/claudiopro>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@@ -754,6 +755,7 @@ declare namespace Draft {
|
||||
|
||||
createEntity(type: DraftEntityType, mutability: DraftEntityMutability, data?: Object): ContentState;
|
||||
getEntity(key: string): EntityInstance;
|
||||
getEntityMap(): any;
|
||||
getLastCreatedEntityKey(): string;
|
||||
mergeEntityData(key: string, toMerge: { [key: string]: any }): ContentState;
|
||||
replaceEntityData(key: string, toMerge: { [key: string]: any }): ContentState;
|
||||
|
||||
Reference in New Issue
Block a user