MCPcopy Create free account
hub / github.com/SamyPesse/draft-js-code / createWithText

Function createWithText

lib/__tests__/onTab.test.js:6–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4const toPlainText = editorState =>
5 editorState.getCurrentContent().getPlainText();
6const createWithText = text => {
7 const contentState = ContentState.createFromText(text);
8 return EditorState.createWithContent(contentState);
9};
10
11const tabs = times => ' '.repeat(times || 1);
12

Callers 1

onTab.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected