Use rich text editor in form field (#16474)
Fix https://github.com/twentyhq/twenty/issues/15948 Before <img width="982" height="505" alt="Capture d’écran 2025-12-10 à 17 26 17" src="https://github.com/user-attachments/assets/661a8205-cb1f-4b4b-8f0a-813c09ac9d16" /> After <img width="982" height="767" alt="Capture d’écran 2025-12-10 à 17 25 49" src="https://github.com/user-attachments/assets/58fa83a8-890e-42cb-a0bd-c5f6d7890d37" />
This commit is contained in:
+9
@@ -23,6 +23,15 @@ export const getInitialAdvancedTextEditorContent = (
|
||||
|
||||
try {
|
||||
const json = JSON.parse(rawContent);
|
||||
|
||||
// Handle BlockNote array format (wrap in doc structure for TipTap)
|
||||
if (Array.isArray(json)) {
|
||||
return {
|
||||
type: 'doc',
|
||||
content: json,
|
||||
};
|
||||
}
|
||||
|
||||
return json;
|
||||
} catch (error) {
|
||||
logError(error);
|
||||
|
||||
Reference in New Issue
Block a user