Skip to content
Snippets Groups Projects
Commit b22df5dd authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

fix: titre par defaut sur la newsletter

parent 155a787d
No related branches found
No related tags found
6 merge requests!96Deploy OpenShift v2,!95MEP fix liens undefined,!91MEP: removed Meilisearch,!79Fix: nginx unprivileged image,!77Back-office SGE before canary release,!543 titre par defaut sur la newsletter
......@@ -41,10 +41,14 @@ const CustomEditor: React.FC<CustomEditorProps> = ({
const handleStateChange = useCallback(
(state: EditorState) => {
setEditorState(state)
handleChange(
stateToHTML(state.getCurrentContent(), { entityStyleFn }),
editorType
)
if (state.getCurrentContent().hasText()) {
handleChange(
stateToHTML(state.getCurrentContent(), { entityStyleFn }),
editorType
)
} else {
handleChange('', editorType)
}
},
[editorType, handleChange, entityStyleFn]
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment