contenido
Version:
Contenido is a library with a set of tools to help you create your own rich text editor on top of draft-js without thinking about how to handle things.
15 lines (10 loc) • 342 B
text/typescript
// Core
import { RichUtils } from '../../core';
// Custom types
import type { State, StateHandler } from '../../types';
const insertSoftNewline = (state: State, stateHanlder: StateHandler): State => {
const newState = RichUtils.insertSoftNewline(state);
stateHanlder(newState);
return newState;
};
export default insertSoftNewline;