From b68443ae9ba42dad4c5e979a771ef417e618a34e Mon Sep 17 00:00:00 2001 From: "Gabriel Mowses (Mouse)" Date: Thu, 2 Apr 2026 09:28:17 -0300 Subject: [PATCH] fix: load rendered HTML in WYSIWYG editor, show real username on collab cursor --- ux/src/components/EditorWysiwyg.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ux/src/components/EditorWysiwyg.vue b/ux/src/components/EditorWysiwyg.vue index 9d0a575b..f0cb4444 100644 --- a/ux/src/components/EditorWysiwyg.vue +++ b/ux/src/components/EditorWysiwyg.vue @@ -119,6 +119,7 @@ import { DateTime } from 'luxon' import { useEditorStore } from '@/stores/editor' import { usePageStore } from '@/stores/page' import { useSiteStore } from '@/stores/site' +import { useUserStore } from '@/stores/user' const lowlight = createLowlight(common) @@ -131,6 +132,7 @@ const $q = useQuasar() const editorStore = useEditorStore() const pageStore = usePageStore() const siteStore = useSiteStore() +const userStore = useUserStore() // I18N @@ -705,13 +707,16 @@ function init () { Collaboration.configure({ document: ydoc }), ...(collabProvider ? [CollaborationCursor.configure({ provider: collabProvider, - user: { name: 'Editor', color: '#006FEE' } + user: { + name: userStore.name || userStore.email || 'AnĂ´nimo', + color: '#' + ['006FEE', '39DDA2', 'FFCF00', 'FF385C', '7C3AED', '4CAC33'][Math.floor(Math.random() * 6)] + } })] : []) ] : [] // -> Initialize TipTap editor = useEditor({ - content: pageStore.content && pageStore.content.startsWith('{') ? JSON.parse(pageStore.content) : `

${pageStore.content}

`, + content: pageStore.content && pageStore.content.startsWith('{') ? JSON.parse(pageStore.content) : (pageStore.render || pageStore.content || ''), extensions: [ StarterKit.configure({ codeBlock: false,