Skip to content

Commit 75cd509

Browse files
authored
fix: cleaned the extra space in description before saving to avoid word break (calcom#27632)
1 parent de24e0a commit 75cd509

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

apps/web/modules/event-types/components/tabs/setup/EventSetupTab.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,12 @@ export const EventSetupTab = (
143143
</Label>
144144
<Editor
145145
getText={() => md.render(formMethods.getValues("description") || "")}
146-
setText={(value: string) =>
147-
formMethods.setValue("description", turndown(value), { shouldDirty: true })
148-
}
146+
setText={(value: string) => {
147+
// Clean up non-breaking spaces
148+
const cleanedValue = value.replace(/&nbsp;/g, ' ');
149+
const markdownValue = turndown(cleanedValue);
150+
formMethods.setValue("description", markdownValue, { shouldDirty: true });
151+
}}
149152
excludedToolbarItems={["blockType"]}
150153
placeholder={t("quick_video_meeting")}
151154
editable={!descriptionLockedProps.disabled}

0 commit comments

Comments
 (0)