11 lines
238 B
TypeScript
11 lines
238 B
TypeScript
const withButton = (incomingEditor) => {
|
|
const editor = incomingEditor;
|
|
const { isVoid } = editor;
|
|
|
|
editor.isVoid = (element) => (element.type === 'button' ? true : isVoid(element));
|
|
|
|
return editor;
|
|
};
|
|
|
|
export default withButton;
|