|  |  | @ -30,26 +30,9 @@ import HistoryTab from './Tabs/HistoryTab.vue' | 
			
		
	
		
		
			
				
					
					|  |  |  | import BubbleMenu from './BubbleMenu.vue' |  |  |  | import BubbleMenu from './BubbleMenu.vue' | 
			
		
	
		
		
			
				
					
					|  |  |  | import FloatingMenu from './FloatingMenu.vue' |  |  |  | import FloatingMenu from './FloatingMenu.vue' | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const ImageAlign = Image.extend({ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   addAttributes() { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     return { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       ...this.parent?.(), |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       alignment: { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         default: 'left', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         renderHTML: attributes => { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           return { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             class: `image-align-${attributes.alignment}`, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   }, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | // Props and emits |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | const props = defineProps({ |  |  |  | const props = defineProps({ | 
			
		
	
		
		
			
				
					
					|  |  |  |   initialContent: { |  |  |  |   content: { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     type: String, |  |  |  |     type: Object || String, | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     default: ` |  |  |  |     default: ` | 
			
		
	
		
		
			
				
					
					|  |  |  |     <h2> |  |  |  |     <h2> | 
			
		
	
		
		
			
				
					
					|  |  |  |         Présentation du groupe |  |  |  |         Présentation du groupe | 
			
		
	
	
		
		
			
				
					|  |  | @ -78,19 +61,45 @@ const props = defineProps({ | 
			
		
	
		
		
			
				
					
					|  |  |  |           N’hésitez pas à nous contacter si vous souhaitez avoir plus d’informations concernant notre groupe ou nos séances. |  |  |  |           N’hésitez pas à nous contacter si vous souhaitez avoir plus d’informations concernant notre groupe ou nos séances. | 
			
		
	
		
		
			
				
					
					|  |  |  |         </p> |  |  |  |         </p> | 
			
		
	
		
		
			
				
					
					|  |  |  |     ` |  |  |  |     ` | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   editable: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     type: Boolean, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     default: true, | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | }) |  |  |  | }) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const emit = defineEmits(['update']) |  |  |  | const emit = defineEmits(['update']) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | // Editor instance |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | const editor = ref(null) |  |  |  | const editor = ref(null) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | const edit = ref(props.editable); | 
			
		
	
		
		
			
				
					
					|  |  |  | const activeTab = ref('text') |  |  |  | const activeTab = ref('text') | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | defineExpose({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   editable: (flag) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     edit.value = flag; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     editor.value.setEditable(flag) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | const ImageAlign = Image.extend({ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   addAttributes() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     return { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       ...this.parent?.(), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       alignment: { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         default: 'left', | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         renderHTML: attributes => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           return { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             class: `image-align-${attributes.alignment}`, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | }) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | // Initialize editor |  |  |  | // Initialize editor | 
			
		
	
		
		
			
				
					
					|  |  |  | onMounted(() => { |  |  |  | onMounted(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   editor.value = new Editor({ |  |  |  |   editor.value = new Editor({ | 
			
		
	
		
		
			
				
					
					|  |  |  |     content: props.initialContent, |  |  |  |     content: props.content, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     editorProps: { |  |  |  |     editorProps: { | 
			
		
	
		
		
			
				
					
					|  |  |  |       attributes: { |  |  |  |       attributes: { | 
			
		
	
		
		
			
				
					
					|  |  |  |         class: 'tiptap-editor', |  |  |  |         class: 'tiptap-editor', | 
			
		
	
	
		
		
			
				
					|  |  | @ -154,7 +163,8 @@ onMounted(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |         json: editor.getJSON() |  |  |  |         json: editor.getJSON() | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |   }) |  |  |  |   }); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   editor.value.setEditable(edit); | 
			
		
	
		
		
			
				
					
					|  |  |  |   emit('update', { |  |  |  |   emit('update', { | 
			
		
	
		
		
			
				
					
					|  |  |  |     html: editor.value.getHTML(), |  |  |  |     html: editor.value.getHTML(), | 
			
		
	
		
		
			
				
					
					|  |  |  |     json: editor.value.getJSON() |  |  |  |     json: editor.value.getJSON() | 
			
		
	
	
		
		
			
				
					|  |  | @ -169,9 +179,9 @@ onBeforeUnmount(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  | }) |  |  |  | }) | 
			
		
	
		
		
			
				
					
					|  |  |  | </script> |  |  |  | </script> | 
			
		
	
		
		
			
				
					
					|  |  |  | <template> |  |  |  | <template> | 
			
		
	
		
		
			
				
					
					|  |  |  |   <div v-if="editor" class="notion-editor-container relative"> |  |  |  |   <div v-if="editor" class="notion-editor-container"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     <!-- Toolbar based on active tab --> |  |  |  |     <!-- Toolbar based on active tab --> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <div class="sticky top-0 right-0 left-0 z-10 bg-white border-b border-gray-200 py-2 flex space-x-2 flex-wrap"> |  |  |  |     <div v-if="edit" class="sticky top-16 right-0 left-0 z-10 bg-white border-b border-gray-200 py-2 flex space-x-2 flex-wrap"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       <Tabs @active="(tab) => activeTab = tab"/> |  |  |  |       <Tabs @active="(tab) => activeTab = tab"/> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <TextTab v-show="activeTab == 'text'" :editor="editor" /> |  |  |  |       <TextTab v-show="activeTab == 'text'" :editor="editor" /> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <BlockTab v-show="activeTab == 'blocks'" :editor="editor"/> |  |  |  |       <BlockTab v-show="activeTab == 'blocks'" :editor="editor"/> | 
			
		
	
	
		
		
			
				
					|  |  | @ -180,9 +190,9 @@ onBeforeUnmount(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       <TableTab v-show="activeTab == 'tables'" :editor="editor"/> |  |  |  |       <TableTab v-show="activeTab == 'tables'" :editor="editor"/> | 
			
		
	
		
		
			
				
					
					|  |  |  |       <HistoryTab v-show="activeTab == 'history'" :editor="editor"/> |  |  |  |       <HistoryTab v-show="activeTab == 'history'" :editor="editor"/> | 
			
		
	
		
		
			
				
					
					|  |  |  |     </div> |  |  |  |     </div> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <BubbleMenu :editor="editor" /> |  |  |  |     <BubbleMenu v-if="edit" :editor="editor" /> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     <!-- Floating Menu for Block Types --> |  |  |  |     <!-- Floating Menu for Block Types --> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <FloatingMenu :editor="editor" /> |  |  |  |     <FloatingMenu v-if="edit" :editor="editor" /> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     <!-- Editor Content --> |  |  |  |     <!-- Editor Content --> | 
			
		
	
		
		
			
				
					
					|  |  |  |     <editor-content  |  |  |  |     <editor-content  | 
			
		
	
		
		
			
				
					
					|  |  |  |     :editor="editor"  |  |  |  |     :editor="editor"  | 
			
		
	
	
		
		
			
				
					|  |  | 
 |