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

Merge branch '3-titre-par-defaut-sur-la-newsletter' into 'dev'

3 titre par defaut sur la newsletter

See merge request web-et-numerique/llle_project/backoffice-client!54
parents 155a787d b22df5dd
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
Pipeline #40200 passed
......@@ -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